当使用webpack + react + react-router + es6时
警告:[history] pushState已弃用; 用而不是推
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 = (); ReactDOM.render( router, document.getElementById('root') );
Linus.. 9
我今天遇到了同样的问题,这是由于对历史回购的新合并请求:
https://github.com/rackt/history/commit/a9db75ac71b645dbd512407d7876799b70cab11c
[TEMP FIX]更新你的package.json,在依赖项中将"history"更改为"1.13.1".之后进行"npm install"更新.
[REAL FIX]等到有人将修复程序合并到react-router中.
我今天遇到了同样的问题,这是由于对历史回购的新合并请求:
https://github.com/rackt/history/commit/a9db75ac71b645dbd512407d7876799b70cab11c
[TEMP FIX]更新你的package.json,在依赖项中将"history"更改为"1.13.1".之后进行"npm install"更新.
[REAL FIX]等到有人将修复程序合并到react-router中.