webpack中,按照文檔的寫法路由不跳轉,下面是我的代碼:const App = () => { return ( <div>
<Link to="/Login">Login</Link>
</div>
)
}const routes = { path: '/', component: App, chidRoutes: [
{path:'Login', component: 'Login'}
]
}
ReactDOM.render(<Router routes={routes} history={hashHistory} />, document.getElementById('root'))
地址欄輸入無效,點擊鏈接報錯截圖:
請教react路由寫法的問題?
收到一只叮咚
2018-10-11 13:14:08