你可以通过withRouter 高阶组件访问history 对象的属性和最近 <Route> 匹配。withRouter 在每次重新渲染时都会更新最新的match, location, 和history 属性。 import React ...
確定! 回上一頁