Exporting state
If you would like to implement and expose a custom global state without exposing Hookstate details, you can wrap a state object by a custom interface. For example:
Loading...
The other more complex example can be found in the demo application, where settings state is mapped directly to a hook which returns state access interface when used.