redux-dynamic-modules-saga
Advanced tools
Comparing version 3.0.3 to 3.1.0
@@ -130,3 +130,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
var sagaB = b; | ||
return sagaA.saga === sagaB.saga && (sagaA.argument === sagaB.argument // TODO: This needs to be a deep equals | ||
return (sagaA.saga === sagaB.saga && sagaA.argument === sagaB.argument // TODO: This needs to be a deep equals | ||
); | ||
@@ -133,0 +133,0 @@ } |
@@ -0,0 +0,0 @@ import { IModule } from "redux-dynamic-modules"; |
"use strict"; | ||
exports.__esModule = true; |
export * from "./Contracts"; | ||
export * from "./SagaExtension"; |
@@ -0,0 +0,0 @@ "use strict"; |
import { ISagaRegistration } from "./Contracts"; | ||
export declare function sagaEquals(a: ISagaRegistration<any>, b: ISagaRegistration<any>): boolean; |
@@ -24,3 +24,3 @@ "use strict"; | ||
var sagaB = b; | ||
return sagaA.saga === sagaB.saga && (sagaA.argument === sagaB.argument // TODO: This needs to be a deep equals | ||
return (sagaA.saga === sagaB.saga && sagaA.argument === sagaB.argument // TODO: This needs to be a deep equals | ||
); | ||
@@ -27,0 +27,0 @@ } |
@@ -0,0 +0,0 @@ import { IExtension } from "redux-dynamic-modules"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ import { ISagaRegistration } from "./Contracts"; |
@@ -0,0 +0,0 @@ "use strict"; |
{ | ||
"name": "redux-dynamic-modules-saga", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"description": "Saga Extension for redux-dynamic-modules", | ||
@@ -30,6 +30,6 @@ "repository": { | ||
"@types/redux": "3.6.0", | ||
"@types/redux-saga": "^0.10.5", | ||
"@types/redux-saga": "0.10.5", | ||
"jest": "^23.5.0", | ||
"redux-dynamic-modules": "^3.0.3", | ||
"redux-saga": "^0.16.0", | ||
"redux-dynamic-modules": "^3.1.0", | ||
"redux-saga": "0.16.2", | ||
"rimraf": "^2.6.2", | ||
@@ -41,3 +41,3 @@ "ts-jest": "^23.1.4", | ||
"uglifyjs-webpack-plugin": "^1.3.0", | ||
"webpack": "^4.17.1", | ||
"webpack": "4.19.1", | ||
"webpack-bundle-analyzer": "^2.13.1", | ||
@@ -67,3 +67,3 @@ "webpack-cli": "^3.1.0" | ||
}, | ||
"gitHead": "b8c290085921dbec9d8b064e87e0c599aebed0ab" | ||
"gitHead": "d8209b38a485b714b0b25085308d4703e28f4dc8" | ||
} |
## Install | ||
Run | ||
Run | ||
``` | ||
@@ -7,3 +9,4 @@ npm install redux-dynamic-modules-saga | ||
or | ||
or | ||
``` | ||
@@ -14,36 +17,36 @@ yarn add redux-dynamic-modules-saga | ||
## Usage | ||
* Create a module with the following format | ||
- Create a module with the following format | ||
```typescript | ||
export function getUsersModule(): ISagaModule<IUserState> { | ||
return { | ||
id: "users", | ||
reducerMap: { | ||
users: usersReducer | ||
}, | ||
sagas: [userSagas] | ||
// Actions to fire when this module is added/removed | ||
// initialActions: [], | ||
// finalActions: [], | ||
} | ||
return { | ||
id: "users", | ||
reducerMap: { | ||
users: usersReducer, | ||
}, | ||
sagas: [userSagas], | ||
// Actions to fire when this module is added/removed | ||
// initialActions: [], | ||
// finalActions: [], | ||
}; | ||
} | ||
``` | ||
* Create a `ModuleStore` | ||
- Create a `ModuleStore` | ||
```typescript | ||
import {configureStore, IModuleStore} from "redux-dynamic-modules"; | ||
import {getUsersModule} from "./usersModule"; | ||
import { configureStore, IModuleStore } from "redux-dynamic-modules"; | ||
import { getUsersModule } from "./usersModule"; | ||
const store: IModuleStore<IState> = configureStore( | ||
/* initial state */ | ||
{}, | ||
/* initial state */ | ||
{}, | ||
/* extensions to include */ | ||
[getSagaExtension(/* saga context object */)], | ||
/* extensions to include */ | ||
[getSagaExtension(/* saga context object */)], | ||
getUsersModule(), | ||
/* ...any additional modules */ | ||
getUsersModule() | ||
/* ...any additional modules */ | ||
); | ||
``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51
45322