Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Never hoist JSX elts referencing vars from the current scope (#14536)
- Loading branch information
1 parent
9c1774a
commit 871ed89
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ansform-react-constant-elements/test/fixtures/constant-elements/regression-14363/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function RoutesComponent() { | ||
return ( | ||
<Routes> | ||
{(c) => { | ||
{ | ||
const Component = c; | ||
return <Component />; | ||
} | ||
}} | ||
</Routes> | ||
); | ||
} |
10 changes: 10 additions & 0 deletions
10
...nsform-react-constant-elements/test/fixtures/constant-elements/regression-14363/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function RoutesComponent() { | ||
return <Routes> | ||
{c => { | ||
{ | ||
const Component = c; | ||
return <Component />; | ||
} | ||
}} | ||
</Routes>; | ||
} |