Skip to content

Commit

Permalink
Update widgets example to use moduleEnhancer
Browse files Browse the repository at this point in the history
  • Loading branch information
navneet-g committed Nov 8, 2018
1 parent 50c0504 commit 73c724b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/widgets-example/src/App.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { Component } from 'react';
import { createStore } from "redux";
import { Provider } from "react-redux";
// We will load the widgets async using react-loadable.
import Loadable from "react-loadable";
// createStore allows us to load/unload modules dynamically.
import { createStore } from "redux-dynamic-modules";
import { moduleEnhancer } from "redux-dynamic-modules";
// Saga extension allows us to use Saga middleware in the module store.
import { getSagaExtension } from "redux-dynamic-modules-saga";
// Thunk extension allows us to use Thunk middleware in the module store.
Expand All @@ -25,7 +26,7 @@ class App extends Component {
* The extensions are optional and you can choose extension based on the middleware you use
* You can also build your own extensions for any other middleware e.g. redux-observable
*/
this.store = createStore({}, [getThunkExtension(), getSagaExtension()]);
this.store = createStore(null, {}, moduleEnhancer([getThunkExtension(), getSagaExtension()]));
}

render() {
Expand Down

0 comments on commit 73c724b

Please sign in to comment.