阅读背景:

react-router源码

来源:互联网 

1.Router.js

Router.js模块用于监听hashChange、popState事件,通过当前页面url更新Router组件的state,state形式为{location,routes,params,components},其中location为当前页面的路径数据,routes为当前页面路径下被激活的Route、IndexRoute、Redirect、IndexRedirect元素,params为当前页面的路径数据变量,components为当前页面下待渲染的UI组件。Router.js模块用于监听hashChange、popState




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: