dillon1000/react
Commit
Browse files Fix evaluation order for JSX element tags
When lowering a JSX element we were correctly lowering to a temporary in all but one case: the common case of an identifier. That is fine in practice but breaks in the presence of the tag identifier being reassigned in the props/children. This PR fixes to always lower the tag to a temporary.
Changed paths8 files
First-parent comparisoncompiler/forget/src/HIR/BuildHIR.ts ModifiedD compiler/forget/src/__tests__/fixtures/compiler/_bug.jsx-tag-evaluation-order.expect.md DeletedA compiler/forget/src/__tests__/fixtures/compiler/error.jsx-tag-evaluation-order.expect.md AddedR compiler/forget/src/__tests__/fixtures/compiler/_bug.jsx-tag-evaluation-order.js →compiler/forget/src/__tests__/fixtures/compiler/error.jsx-tag-evaluation-order.js RenamedM compiler/forget/src/__tests__/fixtures/compiler/error.mutate-after-aliased-freeze.expect.md ModifiedM compiler/forget/src/__tests__/fixtures/compiler/error.mutate-after-freeze.expect.md ModifiedA compiler/forget/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/jsx-tag-evaluation-order.js AddedPatch
Files changed
Rendering syntax-highlighted changes…