React History

1. browerhistory

1. 推荐使用,
2. nginx服务器要配置try-file,当找不到路由时跳转到首页
3. 使用浏览器history对象,不再允许直接访问nn 所以不能直接拷贝地址访问

2. hashhistory

1. url并没有改变,改变的只是hash值
2. ?_k=ckuvup 为了前进后退时能够记录路径而使用的唯一值

3. memoryhistory

1. 不在地址栏上面操作获取

引用: https://github.com/ReactTraining/react-router/blob/master/docs/guides/Histories.md#creatememoryhistory

原文地址:https://www.cnblogs.com/gloxing/p/5969740.html