ComponentState Hook
Is used to create actions
Last updated
Was this helpful?
Is used to create actions
Last updated
Was this helpful?
@react-state follows React and supports hooks from version 7.0.0.
In order to cretae actions you need to pass followinf parameters to useComponentState hook
Actions type
statePath (optional - if not passed then takes root)
stateIndex (optional)
Hook returns actions and new statePath which can be passed further.