V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
fhc023
V2EX  ›  React

还是不太理解为啥 react 要移除 componentWillReceiveProps

  •  
  •   fhc023 · 2019-01-19 12:32:43 +08:00 · 5495 次点击
    这是一个创建于 1914 天前的主题,其中的信息可能已经有所发展或是发生改变。

    说是因为支持异步 Render 采用了 fiber reconciliation。但是为啥异步 render 就不能用 componentWillReceiveProps 了呢?具体有啥会引起问题的例子吗?

    1 条回复    2019-10-18 14:54:16 +08:00
    HuaWan
        1
    HuaWan  
       2019-10-18 14:54:16 +08:00
    讲道理,这个钩子用起来真恶心,很容易死循环。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1136 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 18:31 · PVG 02:31 · LAX 11:31 · JFK 14:31
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.