Created
October 9, 2016 15:32
-
-
Save brookslyrette/8ef9f3f4f5b10c9824c929c7630d5ac0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 { Provider } from 'react-redux' | |
| import { Router, Route, browserHistory } from 'react-router' | |
| import App from './App'; | |
| import './index.css'; | |
| import FrontPageContainer from './containers/FrontPageContainer.js'; | |
| import SubredditPageContainer from './containers/SubredditPageContainer.js'; | |
| import { createStore, applyMiddleware } from 'redux'; | |
| import thunk from 'redux-thunk'; | |
| import { subreddit } from './reducers/redditReducer.js'; | |
| const store = createStore(subreddit, applyMiddleware(thunk)); | |
| ReactDOM.render( | |
| <Provider store={store}> | |
| <Router history={browserHistory}> | |
| <Route component={App}> | |
| <Route path="/" component={FrontPageContainer}/> | |
| <Route path="/r/:name" component={SubredditPageContainer} /> | |
| </Route> | |
| </Router> | |
| </Provider>, | |
| document.getElementById('root') | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment