@banbrick/redux-creator

redux creator for less boilerplate, also allow redux to be loaded by code split.

Usage no npm install needed!

<script type="module">
  import banbrickReduxCreator from 'https://cdn.skypack.dev/@banbrick/redux-creator';
</script>

README

@banbrick/redux-creator

redux creator for less boilerplate, also allow redux to be loaded by code split.

Install

npm i @banbrick/redux-creator

Example

ReactCoreTemplate

How to use

Configure store

create a store can use ReduxCreator with configureStore

import { configureCreatorStore } from '@banbrick/redux-creator';

// its also possible to add reducers and middlewares through this api
const store = configureCreatorStore({ 
  reducers, // static reducers, built without creator
  preloadedState, // inital state
  middlewares, // addtional middlewares
  history, // for auto add location middleware
  devTool: true // enable redux-dev-tool
});

Configure Reducers

Others