- Notifications
You must be signed in to change notification settings - Fork1.8k
Add ...children rest parameter to unstable_createElement#2761
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Mirror `React.createElement(component, props, ...children)` as close as possible without breaking current implementation of unstable_createElement
This pull request is automatically built and testable inCodeSandbox. To see build info of the built libraries, clickhere or the icon next to each commit SHA. Latest deployment of this branch, based on commit8604be8:
|
quantizor commentedMar 27, 2025
I decided to fork this repo to apply the patch and make it available:https://www.npmjs.com/package/react-native-web-fork The easiest way to use it is probably this package.json override: There are other patches applied as well, noted in the package README up top. |
Sick. You know what you really want for your fork: the layout animation API working. People made progress on it in the past. https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver https://youtu.be/5N_VKQO-oFs?si=T5tMxTj4d8zbBFTk https://www.youtube.com/live/S6fHb5ChG0A?si=HS-fT5eyH89pKIj0 Check apple's SwiftUI site for how they do animations. Basically the RN layout animation api is that. And recently Android RN finally started supporting it better. It would be really dope to get this working and then write a custom animation library on top of it to ease many common things. https://developer.apple.com/tutorials/swiftui/animating-views-and-transitions Their withAnimation API is RN's Layout Animation API. |
quantizor commentedMar 27, 2025
Send me a PR! |
Uh oh!
There was an error while loading.Please reload this page.
Mirror
React.createElement(component, props, ...children)as close as possible without breaking current implementation ofunstable_createElement.This provides a way forward for passing children via the rest parameter, which allows a variable number of a children without warning about missing
keyprops as occurs withprops.children.