React functional component using state

后端 未结 4 1842
生来不讨喜
生来不讨喜 2020-12-06 11:30

I\'m trying to implement a React smart component using functions as shown here https://hackernoon.com/react-stateless-functional-components-nine-wins-you-might-have-overlook

4条回答
  •  伪装坚强ぢ
    2020-12-06 12:04

    Stateless Functional Components can't have state, you will need to use a regular React Component if you want to have state within the component.

提交回复
热议问题