react hooks使用
by Balaganesh Damodaran
通过Balaganesh Damodaran
如何使用Hooks将React类组件转换为功能组件 (How to convert React class components to function components using Hooks)
Over the course of the past month, I’ve spent a lot of time working with React hooks. I’ve been building function components using hooks, instead of the traditional class-based components. I’m not going to claim that hooks are definitely superior to class-based components. But there is a huge usability boost, while writing your components as function components…
在过去的一个月中,我花了很多时间来处理React挂钩。 我一直在使用挂钩而不是传统的基于类的组件来构建功能组件。 我不会断言钩子绝对优于基于类的组件。 但是,在将组件编写为功能组件的同时,极大地提高了可用性。
react hooks使用