SIGN IN SIGN UP
facebook / react UNCLAIMED

The library for web and native user interfaces.

0 0 9 JavaScript

[compiler] Improve setState-in-effects rule to account for ref-gated conditionals

Conditionally calling setState in an effect is sometimes necessary, but should generally follow the pattern of using a "previous vaue" ref to manually compare and ensure that the setState is idempotent. See fixture for an example.
J
Joe Savona committed
71d1fa289bd96c2b92fa7dabf5a5ffd5756ecc2a
Parent: 437cae2