,render,componentDidMount,componentWillUpdata,render,componentDidUpdate, componentWillUnmount
生命周期 更新...react-router 4.x组成 react-router(核心路由和函数) , react-router-dom(API) , react-router-native( React Native...应用使用的API)
react-router 4.x的API router(只能有一个) , route(匹配路由渲染UI) , history, link(跳转) , navlink(特定的link...,会带样式) , switch(匹配第一个路由) , redirect(重定向) , withRouter(组件,可传入history,location,match 三个对象)
react-router...) , indexRedirect(默认重定向) , link(跳转) , 路由钩子(onEnter进入,onLeave离开)4.x已经去掉
history react-router有三种模式:1.browserHistory