1.2.7 • Published 5 years ago
cb-simple-global-state v1.2.7
Simple Global State
Restrictive but simple global state manager for react
How to use
- Call
CbSimpleGlobalState.init(<initial global state>)
to get the singleton instance of CbSimpleGlobalState; - use the singleton to get the CbSimpleGlobalStateComponent and load it into the react DOM
- use the useGlobalState functions on the singleton to access global state
Note on Restrictions
- To keep things simple and strongly typed, to focus on developer ease of use, there are only 7 tiers of nested typed global state.
How to publish
- Essentially, you just need to bump the version number and run
npm publish
- This can be done automatically and with test and lint by using
npm run bumpVersion
thennpm run publish