在react-router模块中找不到hashHistory。如果我使用react-router-dom,则:
<HashRouter>
<Route path = "/" Component = {App} />
</ HashRouter>,
document.getElementById ('root')
显示一个空的App.js窗口:
import React, {Component} from 'react';
class App extends Component {
render () {
return (
<div>
<h1> Hello World! </ h1>
</ div>
);
}
};
导出默认应用;