npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

redux-dynamic-modules-saga

5.0.0-alpha.0 • Public • Published

Install

Run

npm install redux-dynamic-modules-saga

or

yarn add redux-dynamic-modules-saga

Usage

  • Create a module with the following format
export function getUsersModule(): ISagaModule<IUserState> {
    return {
        id: "users",
        reducerMap: {
            users: usersReducer,
        },
        sagas: [userSagas],
        // Actions to fire when this module is added/removed
        // initialActions: [],
        // finalActions: [],
    };
}
  • Create a ModuleStore
import { configureStore, IModuleStore } from "redux-dynamic-modules";
import { getUsersModule } from "./usersModule";
 
const store: IModuleStore<IState> = configureStore(
    /* initial state */
    {},
 
    /* extensions to include */
    [getSagaExtension(/* saga context object */)],
 
    getUsersModule()
    /* ...any additional modules */
);

install

npm i redux-dynamic-modules-saga

Downloadsweekly downloads

936

version

5.0.0-alpha.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
Report a vulnerability