import {Router} from 'react-router'
import createBrowserHistory from 'history/createBrowserHistory'
const history = createBrowserHistory();
const store = rehydrate();
const renderApp = Component => {
render(
<Router history={history}>
<App/>
</Router>,
document.getElementById("root")
);
};
这样写不是会直接注入history吗?
我在App里面用this.props.hist6ory.push()就报错!要从context里面取吗?
侃侃尔雅
相关分类