Created
March 21, 2018 22:29
-
-
Save dantenovski/5efdab2da6ff9f1631a9303b5a843e37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom'; | |
import { BrowserRouter, Route, Link } from 'react-router-dom'; | |
import { Provider } from 'react-redux'; | |
import { createStore, applyMiddleware } from 'redux'; | |
import reducer from './reducers/index'; | |
import createSagaMiddleware from 'redux-saga'; | |
import rootSaga from './sagas' | |
const sagaMiddleware = createSagaMiddleware(); | |
let store = createStore( | |
reducer, | |
applyMiddleware(sagaMiddleware) | |
); | |
sagaMiddleware.run(rootSaga); | |
import App from './components/App'; | |
ReactDOM.render( | |
<BrowserRouter> | |
<Provider store={ store }> | |
<App/> | |
</Provider> | |
</BrowserRouter>, document.getElementById('app')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment