react 打包出现空白页面报错

故事扮演 提交于 2020-01-02 11:35:32
import { HashRouter as Router, Route } from 'react-router-dom'
import createHistory from 'history/createHashHistory'
const history = createHistory()

<Router history={history}>
             <Route render={({ location }) => {
                  return(
                        <div>
                            <Route location={location} exact path="/" component={Home} />
                            <Route location={location} path="/detail/:id" component={Detail} />
                            <Route location={location} path="/comment/:id" component={Comment} />
                        </div>
                  )}}/>
        </Router> 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!