Created
March 23, 2018 08:15
-
-
Save ttristan/fd135b0623c25edd345601062502a287 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 from "react"; | |
import ReactDOM from "react-dom"; | |
import App from "./components/App.js"; | |
// redux | |
import { Provider } from "react-redux"; | |
import { createStore, applyMiddleware } from "redux"; | |
import thunk from "redux-thunk"; | |
import rootReducer from "./reducers/root.reducer.js"; | |
// router | |
import { Route } from "react-router"; | |
// redux & router | |
import createHistory from "history/createBrowserHistory"; | |
import { ConnectedRouter, routerMiddleware } from "react-router-redux"; | |
// css | |
import "font-awesome/css/font-awesome.min.css"; | |
// TODO ... | |
// setup | |
const history = createHistory(); | |
const routeMiddleware = routerMiddleware(history); | |
const store = createStore(rootReducer, applyMiddleware(thunk, routeMiddleware)); | |
ReactDOM.render( | |
<Provider store={store}> | |
<ConnectedRouter history={history}> | |
<Route path="/" component={App} /> | |
</ConnectedRouter> | |
</Provider>, | |
document.getElementById("root") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment