GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [playground] Allow (Arrow)FunctionExpressions by poteto · Pull Request #30729 · react/react

Conversation

@poteto

@poteto poteto commented Aug 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

  • -> [playground] Allow (Arrow)FunctionExpressions #30729
  • [compiler] Surface unused opt out directives in eslint #30721
  • [compiler] Run compiler pipeline on 'use no forget' #30720

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

damianstasik reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@poteto
Update
a14c1bc
[ghstack-poisoned]
This was referenced Aug 16, 2024
[compiler] Run compiler pipeline on 'use no forget' #30720
Merged
[compiler] Surface unused opt out directives in eslint #30721
Merged
@vercel

vercel Bot commented Aug 16, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 16, 2024 9:48pm
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@facebook-github-bot facebook-github-bot added the CLA Signed label Aug 16, 2024
poteto added a commit that referenced this pull request Aug 16, 2024
@poteto
[playground] Allow (Arrow)FunctionExpressions
d3992ee
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: 88342ef
Pull Request resolved: #30729
@facebook-github-bot facebook-github-bot added the React Core Team Opened by a member of the React Core Team label Aug 16, 2024
@poteto
Update
39be854
[ghstack-poisoned]
poteto added a commit that referenced this pull request Aug 16, 2024
@poteto
[playground] Allow (Arrow)FunctionExpressions
2e50af7
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: f72f2da
Pull Request resolved: #30729
josephsavona
josephsavona approved these changes Aug 16, 2024
View reviewed changes

@josephsavona josephsavona left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sweet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@poteto
Update
feaf530
[ghstack-poisoned]
poteto added a commit that referenced this pull request Aug 16, 2024
@poteto
[playground] Allow (Arrow)FunctionExpressions
003dd07
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: 49af543
Pull Request resolved: #30729
@poteto
Update
cfd2c60
[ghstack-poisoned]
poteto added a commit that referenced this pull request Aug 16, 2024
@poteto
[playground] Allow (Arrow)FunctionExpressions
b5eac98
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: #30729
@vercel
vercel Bot deployed to Preview August 16, 2024 21:48
View deployment
@poteto

poteto commented Aug 16, 2024

Copy link
Copy Markdown
Collaborator Author

It works: https://react-compiler-playground-git-gh-poteto6head-fbopensource.vercel.app/#N4Igzg9grgTgxgUxALhAgHgBwjALgAgBMEAzAQygBsCSoA7OXASwjvwFkBPAQU0wAoAlPmAAdNvhgJcsNgB5CTAG4A+ABIJKlCPgDqOSoTkB6RaoDc4gL7jxcVmAK6yBALz4h+VypH4r5-EDAuwcnFwAmL3xaBmZWD2FgPxC6Rz0XAGYomMYWNmdcTySrECsgA

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poteto
poteto merged commit cfd2c60 into gh/poteto/6/base Aug 16, 2024
poteto added a commit that referenced this pull request Aug 16, 2024
@poteto
[playground] Allow (Arrow)FunctionExpressions
a58276c
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: #30729
@poteto
poteto deleted the gh/poteto/6/head branch August 16, 2024 22:12
@eps1lon eps1lon mentioned this pull request Aug 22, 2024
Update React from 1eaccd82-20240816 to eb3ad065-20240822 vercel/next.js#69196
Merged
eps1lon added a commit to vercel/next.js that referenced this pull request Aug 23, 2024
@eps1lon
Update React from 1eaccd82-20240816 to eb3ad065-20240822 (#69196)
6c09bd9
**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>
gsathya
gsathya reviewed Nov 22, 2024
View reviewed changes
Comment thread compiler/apps/playground/components/Editor/EditorImpl.tsx
): ReactFunctionType {
if (id && id.node && id.isIdentifier()) {
if (isHookName(id.node.name)) {
function getReactFunctionType(id: t.Identifier | null): ReactFunctionType {

@gsathya gsathya Nov 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for 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.

Uh oh!

There was an error while loading. Please reload this page.

josephsavona reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
hanzo-dev pushed a commit to hanzoai/react that referenced this pull request Sep 9, 2026
@poteto
[playground] Allow (Arrow)FunctionExpressions
17f0a14
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

This branch was successfully deployed

1 active deployment
Preview — cfd2c605 Deployed Aug 16, 2024 by vercel[bot]
View deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers
@gsathya gsathya gsathya left review comments
@josephsavona josephsavona josephsavona approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@poteto @gsathya @josephsavona @facebook-github-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.