当使用 webpack + react + react-router + es6 时
警告:[history] pushState 已过时,请改用 push 代替
<pre>
import React from 'react';
import ReactDOM from 'react-dom';
import {createHistory} from 'history';
import App from './component/app';
import About from './component/about';
import Concat from './component/concat';
import List from './component/list';
import {Router, Route} from 'react-router';
const history = createHistory();
const router = (
<Router history={history}>
<Route path="/" component={App}>
<Route path="about" component={About} />
<Route path="concat" component={Concat} />
<Route path="list/:id" component={List} />
<Route path="*" component={About}/>
</Route>
</Router>
);
ReactDOM.render(
router,
document.getElementById('root')
);
</pre>