I am new to ReactJs. This is my code:
var React = require(\'react\');
var ReactDOM = require(\'react-dom\');
var {Route, Router, IndexRoute, hashHistory} = requ
I got the same problem in ES6, but when I switched to use 'react-router-dom' library, the problem was solved. For all fans of ES6, here we go:
npm install --save react-router-dom
In index.js:
import {HashRouter, Route} from 'react-router-dom';
import App from './App';
ReactDOM.render(
,
document.getElementById('root')
);