2.0.0 • Published 4 years ago
ts-redux-store-builder v2.0.0
Ts-redux-store-builder
Create redux store with types like this:
const moduleStore = new ModuleStore<IState, IActions>(
moduleName, // it is using in action types
actionHandlers, // generates reducer from your actions (includes API actions!)
initialState, // your any object structure (with IState type)
customSelectors, // you can wrap default selectors
);
// your module store with types!
const { actions, reducer, selectors } = moduleStore;
Example
See this example with details. Run it:
yarn build
node dist/examples/storeWithAPIActions.js
Publish
yarn run major/minor/patch
yarn publish