global-use-hook
v1.0.0
Published
global hook for state and actions management
Downloads
2
Readme
react-global-hook
What is this?
Get a state and actions management for your app
Installation
npm i react-global-hook --save
Then...
... import useStore from 'global-use-hook'
const initialState = { counter: 0 }
const actions = { add: (store, value) => { store.setState({ counter: value }) } }
const useGlobal = useStore(React, initialState, actions) ...