mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
3f4a9bd330
Previously the only way to replace a value was to override transformInstruction and transformTerminal, and to be careful to find nested values. This PR adds `ReactiveFunctionTransform#transformValue()` which allows returning an optional new value, which if present will replace the value in whatever context it appeared. ReactiveFunctionTransform now reimplements all the methods necessary to replace any value anywhere in the AST. See the next PR for an example usage.