-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Block Editor: Fix React Compiler error for 'BlockProps' util component #66809
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: 0 B Total Size: 1.82 MB ℹ️ View Unchanged
|
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.
LGTM 👍
Thanks @Mamaduka!
Flaky tests detected in 3830ac2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11719518500
|
setAllWrapperProps, | ||
...props | ||
} ) { | ||
const wrapperProps = hook( props ); |
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.
Why is this not allowed?
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.
Passing hooks as pros and the calling then isn’t allowed. The error in description has link with more info.
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.
What if we pass the feature? These are all constant. Or add feature IDs and then grab the feature in the component.
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.
Sorry, I don’t follow. Can you share a code example?
…ss#66809) Co-authored-by: Mamaduka <[email protected]> Co-authored-by: tyxla <[email protected]>
What?
Part of #61788.
PR fixes the React Compile error for the 'BlockProps' util component by renaming it during destructure. This is similar to how the commands loader avoids a similar error.
gutenberg/packages/commands/src/components/command-menu.js
Line 38 in 8be8e46
Why?
Testing Instructions
All CI checks should be green; we're just renaming the prop.