mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
c59c3dfe55
Reading or writing a ref value during render is only safe if you are implementing the lazy initialization pattern. Other types of reading are unsafe as the ref is a mutable source. Other types of writing are unsafe as they are effectively side effects. This change also refactors useTransition to no longer use a ref hook, but instead manage its own (stable) hook state.