-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rcr] Reexport React.__COMPILER_RUNTIME.c or fallback to polyfill #31140
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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
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>
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; |
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.
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.
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.
cc @poteto @josephsavona this would be good to double-check
This PR updates the standalone
react-compiler-runtime
package toeither re-export
React.__COMPILER_RUNTIME.c
or to use a userspacepolyfill.