Skip to content

jeshio/ts-redux-store-builder

Repository files navigation

npm npm bundle size Travis (.org) Codecov

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

About

Build Redux store with TypeScript!

Resources

Stars

Watchers

Forks

Packages

No packages published