React router用hashhistory的问题

#1

用hashhistory似乎会导致ie崩掉啊,怎么解决???
求各位大大帮助

#2

最近也遇到项目要兼容ie9,刚开始出现路由不断切换至崩溃,后面改换成hashhistory解决。。。

#3

可是我是用了hashhistory崩溃了,ie11都不行

#4

我的怎么就没有崩溃掉?
这是展示链接:http://www.sharemyself.cc/react/
这是项目链接:https://github.com/JasonBai007/reactSPA

#5

我现在是在多个react spa之间跳转就会碰到这个问题

#6

import { supportsHistory } from ‘history/lib/DOMUtils’;
const historyStrategy = supportsHistory() ? browserHistory : hashHistory;
先用这个判断浏览器支持哪种方式。
另外你也可以看https://github.com/ReactTraining/react-router/blob/4f2746155ce1cb6bd194864f9feb1599b2e46c51/docs/guides/Histories.md 希望可以帮到你,另外问题所在你再具体点,大家才好帮你解决

#7

最后发现并不是react router的问题
根本问题是fetch的问题
装了一个fetch-ie8的插件就解决了

#8

用hash不会觉得太奇怪吗?