https://frontlich.github.io/nice-store/#/
npm install nice-store
import { createCoreStore } from "nice-store";
const store = createCoreStore(0);
store.subscribe(console.log);
store.setState(1); // will log 1
store.getState(); // 1
import { createStore } from "nice-store";
create enhanced store with initialState and enhancers
createStore(initialState, ...enhancers);
internal enhancers:
- async(asyncFn, 'takeLatest' | 'takeEvery')
- asyncLoading()
- connect(...otherStores)
- reducer(reducerFn)
- reset()
- selectorHook()
- task(taskFn)
- thunk(thunkFn)
other enhancers: