标签:nbsp from pat store rom 升级 doc history div
react-router 升级4.0以后 出现了 ‘react-router-dom‘
引入时要import {BrowserRouter, Route} from ‘react-router-dom‘;
<Provider store={store} key="provider">
<BrowserRouter history={history} onUpdate={() => window.scrollTo(0, 0)}>
<Root />
</BrowserRouter>
</Provider>, document.getElementById(‘root‘));
root.js页
<div>
<Route path="/" component={Loader}/>
<Route path="/wwz" component={App}/>
<Route path="/login" exact component={Login}/>
</div>
标签:nbsp from pat store rom 升级 doc history div
原文地址:http://www.cnblogs.com/fengyifengceaser/p/7117310.html