Skip to content

Instantly share code, notes, and snippets.

@carlosble
Created April 2, 2017 21:41
Show Gist options
  • Save carlosble/ba0a2d955a018dc91e3fa507fd49383e to your computer and use it in GitHub Desktop.
Save carlosble/ba0a2d955a018dc91e3fa507fd49383e to your computer and use it in GitHub Desktop.
typical index of a react-redux app
import React from 'react';
import {render} from 'react-dom';
import {Provider} from 'react-redux';
import {Router, browserHistory} from 'react-router';
import routes from './routes';
import configureStore from './store/configureStore';
import {syncHistoryWithStore} from 'react-router-redux';
const store = configureStore();
const history = syncHistoryWithStore(browserHistory, store);
render(
<Provider store={store}>
<Router history={history} routes={routes}/>
</Provider>, document.getElementById('app')
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment