react-router withRouter

react-router 提供了一个withRouter组件 withRouter能够包装任何自定义组件,将react-router 的 history,location,match 三个对象传入。 无需一级级传递react-router 的属性,当须要用的router 属性的时候,将组件包一层withRouter,就能够拿到须要的路由信息react import {withRouter} fro
相关文章
相关标签/搜索