Code Monkey home page Code Monkey logo

Comments (14)

CJY0208 avatar CJY0208 commented on June 26, 2024 1

@huiBuiling @zxfgll

可能是 react-routerwithRouter 在 ie9 / ie10 下有什么暗病,如果目前降版本能用的话,就先用着啦,最近忙业务一直没时间看

因为 1.4.2 是为了兼容 react-router v4.4+ 的修复版本,如果项目中 react-router 版本没有达到 4.4 的话,是不需要升级到 1.4.2

这条 issues 先保持开启吧,后续尝试能否无感知修复掉,正好也做个解法标记,谢谢你们啦

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

使用Switch正常,使用CacheSwitch就会报错,例子也是按demo写的

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 26, 2024

其他浏览器如 chrome 功能正常吗?能否提供可复现的最小 demo 片段呢

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

Edge和chrome都正常的
image

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 26, 2024

OK,感谢反馈!近期会尝试解决

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

好的,非常感谢

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 26, 2024

Hello,看来看去有些奇怪

<CacheSwitch> 的工作方式为继承 <Switch> 并重写了 render 方法,上述报错是出现在 <Switch> 的原有 render 方法中

按理来说,重写 render 方法后,使用 <CacheSwitch> 时无论如何都不应该出现上述报错才对

除非使用了旧版本的 <Switch>,报错并不是在其 render 方法中输出

我猜测可能是某种未知的兼容性问题,但缺乏更多有效的信息,能否提供完整的 Demo 目录呢?

可以加我 QQ:375564567 以压缩包形式提供,或者在此处张贴全部 Demo 代码

另外需要知晓 Demo 中的 reactreact-domreact-router 版本号,十分感谢!

from react-router-cache-route.

zxfgll avatar zxfgll commented on June 26, 2024

我也遇到这个问题,除了ie9和ie10有这个问题,其他现代浏览器都没有这个问题

from react-router-cache-route.

zxfgll avatar zxfgll commented on June 26, 2024

测试后"react-router-cache-route": "^1.4.1" 没问题,"react-router-cache-route": "^1.4.2"存在这个问题

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

image

"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-router": "^4.1.1",
"react-router-dom": "^4.1.1",
"react-router-cache-route": "^1.3.1",

edge下是可以的,之前也一直用的可以的,是后面突然不行的

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

@zxfgll 那我也测试下

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

@CJY0208 大大,这边删包重新install可以了,不确定是不是是版本,但是之前确实用了半年很赞,也没有报错哦

from react-router-cache-route.

huiBuiling avatar huiBuiling commented on June 26, 2024

好的

from react-router-cache-route.

CJY0208 avatar CJY0208 commented on June 26, 2024

@huiBuiling @zxfgll
v1.4.3 尝试识别 router-router v4.4+ 特征来决定是否使用 withRouter 包裹 CacheSwitch 组件,在版本低于 4.4 时不会使用 withRouter

可以试试看,是否修复了当前 Issues

from react-router-cache-route.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.