参考:
https://segmentfault.com/a/1190000007166839
http://zhenhua-lee.github.io/react/history.html
一、共有多少种 router 实现
exports.createBrowserHistory = _createBrowserHistory3.default;
exports.createHashHistory = _createHashHistory3.default;
exports.createMemoryHistory = _createMemoryHistory3.default
二、原理
1、hashchange
2、 pushState, replaceState, and the popstate event.
3、Creates a history object that stores locations in memory.
网友评论