Skip to main content

Local state

Creating and using local state

When a state is used by only one component, and maybe its children, it is recommended to use local state instead of global state. In this case useHookstate behaves similarly to React.useState, but the returned instance of State has more features.


Read more about useHookstate and State in the API reference.