DEV Community

loading...

Discussion on: state hook not a function

Collapse
aqrojo profile image
aqrojo

As Jack says, this hook return only 2 values, a getter prop and a setter function
If you want to manage more than one value, I may recommend you the useReducer hook or something like useSetState hook:
github.com/streamich/react-use/blo...