dillon1000/react

Commit

Support reordering call expressions

Supports call expressions if the callee and args are themselves reorderable. As 
part of this I realized that we currently allow identifier references to be 
reordered. To be safe, this PR updates the logic to continue consider 
identifiers as reorderable, but considers an arrow function to be not 
reorderable if it contains a local variable reference. We can likely relax that 
rule, but this quickly unblocks the next experiment.
Browse files
Changed paths6 files
First-parent comparison
M compiler/packages/babel-plugin-react-forget/src/HIR/BuildHIR.ts ModifiedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/default-param-calls-global-function.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/default-param-calls-global-function.js AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.default-param-accesses-local.expect.md AddedA compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.default-param-accesses-local.js AddedM compiler/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/error.todo-kitchensink.expect.md Modified
Patch

Files changed

Rendering syntax-highlighted changes…