I build a project with Webpack and react-rounter. this is my code:
ReactDOM.render(
<Provider store={store}>
<Router history={ browserHistory }>
<Route path='/' component={ App } >
<IndexRoute component={ Home } />
<Route path="purchase" component={ Purchase } />
<Route path="purchase/:id" component={ Purchase } />
</Route>
</Router>
</Provider>,
document.getElementById('example')
);
See Question&Answers more detail:os