Folder structure #398

Merged
bones7242 merged 76 commits from folder-structure into master 2018-03-20 00:01:08 +01:00
Showing only changes of commit 402724e513 - Show all commits

View file

@ -21,29 +21,25 @@ const sagaMiddleware = createSagaMiddleware();
const middleware = applyMiddleware(sagaMiddleware); const middleware = applyMiddleware(sagaMiddleware);
const reduxMiddleware = window.__REDUX_DEVTOOLS_EXTENSION__ ? compose(middleware, window.__REDUX_DEVTOOLS_EXTENSION__()) : middleware; const reduxMiddleware = window.__REDUX_DEVTOOLS_EXTENSION__ ? compose(middleware, window.__REDUX_DEVTOOLS_EXTENSION__()) : middleware;
const SpeechClient = () => { // create teh store
// create teh store let store;
let store; if (preloadedState) {
if (preloadedState) { store = createStore(Reducer, preloadedState, reduxMiddleware);
store = createStore(Reducer, preloadedState, reduxMiddleware); } else {
} else { store = createStore(Reducer, reduxMiddleware);
store = createStore(Reducer, reduxMiddleware); }
}
// run the saga middlweare // run the saga middlweare
sagaMiddleware.run(rootSaga); sagaMiddleware.run(rootSaga);
// render the app // render the app
hydrate( hydrate(
<Provider store={store}> <Provider store={store}>
<BrowserRouter> <BrowserRouter>
<GAListener> <GAListener>
<App /> <App />
</GAListener> </GAListener>
</BrowserRouter> </BrowserRouter>
</Provider>, </Provider>,
document.getElementById('react-app') document.getElementById('react-app')
); );
};
module.exports = SpeechClient;