@saber2pr/use-reducer
v0.0.3
Published
useReducer & getState.
Downloads
3
Readme
@saber2pr/use-reducer
npm i @saber2pr/use-reducer
API
export const initState = {
current: 100,
delta: 1
}
export const [getState, useReducer] = createStore(state)
// useReducer
const [state, dispatch] = useReducer(reducer, initialState)
// const [state, dispatch] = useReducer(reducer, initialState, initialAction)
// getState
const globalState = getState()
Author
saber2pr