Alex Bettadapur 2018-10-17 14:10:02 -07:00
Родитель 5dcffd0b5c 28650b5f2e
Коммит 741b09ddc8
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -21,7 +21,7 @@ Modules provide the following benefits:
* Group together reducers, middleware, and state into a single, re-usable module.
* Add and remove modules from a Redux store at any time.
* Use the included `<DynamicModuleLoader />` component to automatically add a module when a component is rendered
* Extensions provide integration with popular libraries, including `redux-saga` and `redux-observable`
* Extensions provide integration with popular libraries, including `redux-saga` and `redux-thunk`
## Example Scenarios
* You don't want to load the code for all your reducers up front. Define a module for some reducers and use `DynamicModuleLoader` and a library like [react-loadable](https://github.com/jamiebuilds/react-loadable) to download and add your module at runtime.
@ -79,7 +79,7 @@ const store: IModuleStore<IState> = configureStore(
* Use the `DynamicModuleLoader` React component to add/remove modules when components mount/unmount
```jsx
<DynamicModuleLoader modules={modules}>
<DynamicModuleLoader modules={[getHelloWorldModule()]}>
<div>Hello World!!</div>
</DynamicModuleLoader>
```