mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
This is a pre-req to construct reactive scopes in #857. "Value blocks" such as `for` init/test/update and `while` test need to be consistently wrapped in enter/leave calls so that we can extend the range of values properly. We also need to handle `for` init blocks a bit differently, since they allow variable declarations but not other types of statements. This PR ensures that we use consistent methods for handling value blocks (`for` test/update and `while` test) and treats `for` init as a new type with its own enter/append/leave visitor functions.