Skip to content

Conversation

@poteto
Copy link
Member

@poteto poteto commented Oct 7, 2024

This PR updates the standalone react-compiler-runtime package to
either re-export React.__COMPILER_RUNTIME.c or to use a userspace
polyfill.

poteto added 2 commits October 7, 2024 15:18
[ghstack-poisoned]
[ghstack-poisoned]
@vercel
Copy link

vercel bot commented Oct 7, 2024

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 Oct 7, 2024 8:28pm

[ghstack-poisoned]
@poteto poteto changed the base branch from gh/poteto/25/head to main October 7, 2024 20:25
@poteto poteto merged commit d2367f1 into main Oct 7, 2024
19 checks passed
@poteto poteto deleted the gh/poteto/26/head branch October 7, 2024 20:31
poteto added a commit that referenced this pull request Oct 11, 2024
In #31140 we switched over the uMC polyfill to use memo instead of state since memo would FastRefresh properly. However this busted devtools' badging of compiled components; this PR fixes it.

TODO: tests
poteto added a commit that referenced this pull request Oct 14, 2024
In #31140 we switched over the uMC polyfill to use memo instead of state since memo would FastRefresh properly. However this busted devtools' badging of compiled components; this PR fixes it.

TODO: tests
Co-authored-by: Ruslan Lesiutin <rdlesyutin@gmail.com>
hoxyq added a commit that referenced this pull request Oct 15, 2024
In #31140 we switched over the uMC polyfill to use memo instead of state
since memo would FastRefresh properly. However this busted devtools'
badging of compiled components; this PR fixes it.

TODO: tests
Co-authored-by: Ruslan Lesiutin <rdlesyutin@gmail.com>

---------

Co-authored-by: Ruslan Lesiutin <rdlesyutin@gmail.com>
// This symbol is added to tell the react devtools that this array is from
// useMemoCache.
// @ts-ignore
$[$empty] = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just looking at this now — I know this already existed, but isn't there a concern that this would mess with the hidden class or something? Setting a non-array property on an array seems dicey.

Copy link
Collaborator

Choose a reason for hiding this comment

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

cc @poteto @josephsavona this would be good to double-check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants