React Stateful Function
Requires React version =< 16.8 to work
Implement react state into your function component in just One Step!
- Use useDidMount instead of componentDidMount
- Use useWillUnmount instead of componentWillUnmount
- Use useDidUpdate which is easier than of componentDidUpdate
- Initialize your state and update it inside any function component
- Very simple way to change state, just like Component setState !
- No hooks background needed at all, just import and use!
Instalation
npm i react-stateful-function
- OR -
yarn add react-stateful-function
Usage Example
; ; ; ;