Since there is no solution yet, find my (minimal) version of the router below, which works for me.
Dependencies:
- react@15.1.0
- react-dom@15.1.0
- react-router@2.4.0
History.js is not required explicitly, as it is a reaction-router dependency.
Webpack don't forget to add
devServer: { historyApiFallback: true }
to your webpack.config.js, since the webpack-dev server may have the correct routing routes (mainly from the point of view of reverse navigation).
import React from 'react'; import {render} from 'react-dom'; import {Router, Route, IndexRoute, browserHistory} from 'react-router'; import {Routes} from './Routes'; // your routes file render( <Router history={browserHistory}> {Routes} </Router>, document.querySelector('#smartadmin-root') );
I would advise you to try this code and leave your material for hot download. Let me know if this helps, and if there are any questions. I am happy to change my post as necessary.
Rico Herwig May 30 '16 at 18:51 2016-05-30 18:51
source share