使用withRouter報錯的問題緣由及解決辦法

緣由是由於你沒有把你的Router放在最外面,withRouter不能夠放在Router的外面。css 好比【下方是錯誤的】:react 在下面的代碼中若是你在BasicLayout組件中使用withRouter就會報錯: You should not use <withRouter(BasicLayout) /> outside a <Router>web 緣由是由於你將BasicLayout組
相關文章
相關標籤/搜索