
从上篇文章可以知道,react-router 本质上,利用了 history api 的 pushState, replaceState 方法来控制路由地址,然后使用 popstate, hashchange 事件来监听变化,从而做出相应的视图变化。这篇文章要讲的,就是视图变化的逻辑这部分。
推荐:★★★★

对 react-router 的分析,目前准备主要集中在三点:
a. history 的分析。
b. history 与 react-router 的联系。
c. react-router 内部匹配及显示原理。
这篇文章准备着重理解 history.
推荐:★★★☆
Update your browser to view this website correctly. Update my browser now