We know you will learn the Hookstate library API very quickly without reading much (if any) of the documentation. The following will help you get started in minutes:
- Intuitive API. Most things will be self-explanatory. More in depth description will always be there.
- Code samples in each section are self-contained, complete and interactive. So, jump to the relevant section, copy-paste a sample to your app and extend it as needed.
- Complete demo application. There is a Todo-list-like complete demo application built with Hookstate. It uses and demonstrates most of the core features of Hookstate. It gives an example of how to organise your project. You may follow the example or use any other module-composition structure. Here it is running in an
Installation and dependencies
The library does not have external or peer dependencies, except React.
Hookstate consists of the core package
@hookstate/core and optional plugins
@hookstate/*, which you may include when needed. We have a goal of keeping the core library as small as possible but still feature-rich to address most of problems in state management and provide a good foundation for plugins. Plugins extend the library and address more specific needs. You can also write your own plugins: it is easy and gives a lot of power.
Hookstate supports all recent browsers and works where React works, including mobile applications and server side rendering.
The library supports IE11 with a few exceptions for mutations of nested state, which has alternative working methods. The nested state section notes these exceptions.
If you need to polyfill, for example for IE11, you need to make sure the following is supported by the target environment. You may checkout the existing IE11 demo project.
Set(All are available a long time ago, including for IE11)
Symbol(You likely already have got one from the
react-app-polyfill. If you do not import
react-app-polyfill, you can get the standalone
Number.isInteger(Polyfill is available from