Toggle Class in React

后端 未结 5 911
误落风尘
误落风尘 2020-12-13 18:27

I\'m using react for a project where I have a menu button.

         


        
5条回答
  •  感情败类
    2020-12-13 18:54

    For anybody reading this in 2019, after React 16.8 was released, take a look at the React Hooks. It really simplifies handling states in components. The docs are very well written with an example of exactly what you need.

提交回复
热议问题