How to use clsx in React

后端 未结 3 1947
迷失自我
迷失自我 2021-01-31 08:50

I am trying to understand some uses of clsx in assigning classnames to a component in React.

The construct

className={clsx(classes.menuButton, open &         


        
3条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 09:14

    classes.appBarShift will be applied only if open evaluates to true. If the array has more classes all of them will be applied if open evaluates to true

提交回复
热议问题