Pass plugins via context instead of using Redux store

This commit is contained in:
Cássio Zen
2016-08-18 09:09:54 -03:00
parent d22a4da057
commit 986e36c137
4 changed files with 58 additions and 48 deletions

View File

@ -14,7 +14,7 @@ const store = configureStore();
// Create an enhanced history that syncs navigation events with the store
syncHistory(store);
initPluginAPI(store);
const Plugin = initPluginAPI();
const el = document.createElement('div');
el.id = 'root';
@ -22,8 +22,10 @@ document.body.appendChild(el);
render((
<Provider store={store}>
<Router history={history}>
{routes}
</Router>
<Plugin>
<Router history={history}>
{routes}
</Router>
</Plugin>
</Provider>
), el);