dillon1000/react

Commit

Repro for needing function body rewriting in ReactiveFunction phase

Adds an example demonstrating why we need the ability to rewrite parts of a
ReactiveFunction into a function expression. Here, the reactive scope needs to
contain an `if` terminal, but we can't put a ReactiveIfTerminal inside a
function expression, since that expects HIR.

There are two main paths forward:

* Use HIR everywhere. I wrote this up and we're all agreed, it's just a bunch of
work.

* Add an alternative FunctionExpression variant to ReactiveFunction

For now i'm going to take the second route.
Browse files
Changed paths1 file
First-parent comparison
M compiler/packages/babel-plugin-react-forget/src/Inference/InferAliasForPhis.ts Modified
Patch

Files changed

Rendering syntax-highlighted changes…