GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||
GeezerVison is showing github.com — [playground] Allow (Arrow)FunctionExpressions by poteto · Pull Request #30729 · react/react Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
sweet
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
**breaking change for canary users: Bumps peer dependency of React from `19.0.0-rc-1eaccd82-20240816` to `19.0.0-rc-eb3ad065-20240822`** No changes required in Next.js it seems. [diff react/react@1eaccd82...eb3ad065](react/react@1eaccd8...eb3ad06) <details> <summary>React upstream changes</summary> - react/react#30761 - react/react#30779 - react/react#30775 - react/react#30770 - react/react#30756 - react/react#30755 - react/react#30768 - react/react#30760 - react/react#30732 - react/react#30757 - react/react#30750 - react/react#30751 - react/react#30753 - react/react#30740 - react/react#30748 - react/react#30746 - react/react#30747 - react/react#30731 - react/react#30725 - react/react#30741 - react/react#30730 - react/react#30726 - react/react#30717 - react/react#30729 - react/react#30721 - react/react#30720 - react/react#30705 </details>
| ): ReactFunctionType { | ||
| if (id && id.node && id.isIdentifier()) { | ||
| if (isHookName(id.node.name)) { | ||
| function getReactFunctionType(id: t.Identifier | null): ReactFunctionType { |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
For ArrowFunctionExpressions, we now incorrectly assume components to be of type 'Other' as they don't have an identifier. There are optimisations and assumptions that depend on getting this type correct, which cause incorrectly generated code.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This was a pet peeve where our playground could only compile top level FunctionDeclarations. Just synthesize a fake identifier if it doesn't have one. ghstack-source-id: 882483c Pull Request resolved: react#30729
cfd2c605
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.