-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feature/dynamic element #71
base: master
Are you sure you want to change the base?
Conversation
a0578b0
to
65f03f8
Compare
Would it be possible to add a phantom type variable to the element type, so that "compound" elements can be distinguished from "simple"/"single" elements? I believe that would allow components to restrict themselves to only accepting a single child. E.g.: let make = (~children: element(single), ()) => ... And |
@glennsl I'm afraid no.
OOps |
Couldn't fragment just be |
This PR removes keys and removes lists as the container for sequences of elements. Instead of keys you can use constant identity like so:
Dynamic list API is not done yet but it will be amazing. Believe me.
Btw, if you use the component returned by
movableStateContainer
multiple times the result is undefined but in the future I'll make it so that all resulting instances will share state but won't share the view.They will be essentially cloned.