-
Notifications
You must be signed in to change notification settings - Fork 348
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
ppx: support "custom children" in uppercase components without having to wrap in array literal #823
Conversation
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.
I think this make sense.
I wonder if we should mention this difference between uppercase / lowercase components in our documentation.
@davesnx what are your thoughts on this?
@anmonteiro We do mention something already:
Do you mean to expand on that? |
Right, I wonder if we should mention that these are no longer wrapped in array, or if it's OK just to document it in the changelog. |
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.
Looks like a great idea, uppercase components supporting any children looks nice
I wonder if you can add the test case for a fragment (which is a list on the parsetree) which avoids the wrapping.
|
b149bbd
to
f9fe66e
Compare
merging this as discussed in https://ahrefs.slack.com/archives/C01RF16D2LA/p1732103117043289 let's revert if anyone disagrees. |
Fixes #822.
The breaking change is for uppercase components that were introspecting with
React.Children
. After the change, these components would need to runchildren
throughReact.array
.It allows to write:
besides the already possible: