dillon1000/react
Commit
Browse files [compiler] Always emit FuncDecl for outlined functions
Addresses follow up feedback from #30446. Since the outlined function is guaranteed to have a module-scoped unique identifier name, we can simplify the insertion logic for the outlined function to always emit a function declaration rather than switch based on the original function type. This is fine because the outlined function is synthetic anyway. ghstack-source-id: 0a4d1f7b0a5a34f8ed68c463b1a153c51c3ea75e Pull Request resolved: https://github.com/facebook/react/pull/30464
Changed paths2 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/Entrypoint/Program.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/outlining-in-func-expr.expect.md ModifiedPatch
Files changed
Rendering syntax-highlighted changes…