fhc023
V2EX  ›  React

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

  •  
  •   fhc023 · Jan 19, 2019 · 6436 views
    This topic created in 2676 days ago, the information mentioned may be changed or developed.

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

    1 replies    2019-10-18 14:54:16 +08:00
    HuaWan
        1
    HuaWan  
       Oct 18, 2019
    讲道理,这个钩子用起来真恶心,很容易死循环。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1918 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:13 · PVG 00:13 · LAX 09:13 · JFK 12:13
    ♥ Do have faith in what you're doing.