There's a package called classNames. I try to use it to hide show when a user switch tab, can I pass in the expression like this instead of using a flag checking true or false?
<div className={classNames("tab", {(this.state.selectedTab === 2), "hide"})}> //content </div> But above code won't work.
className={classNames("tab", {"hide": this.state.selectedTab === 2})}classNames("tab", {"hide": this.state.selectedTab === 2})