-
Notifications
You must be signed in to change notification settings - Fork 1
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
Experiment: try letting CompositeComponent have an array of _renderedComponents #10
Comments
hm, so here's an issue with this plan. the following:
becomes:
and while it may be possible to allow components to render multiple root components, expanding arrays into multiple root components seems potentially more complicated to maintain. |
If fragments are flattened into children, the way root nodes work will need to be overhauled to support multiple nodes. Right now this:
ends up as:
when it should be something to the effect of:
where |
I think that, because of how |
huh, fun fact: |
current major issue here is that reconciliation isn't easy. it'd require either: a) basically reimplementing ReactMultiChild in ReactCompositeComponent, or |
I'm concerned that the whole
ReactDOMFragment
idea was bad from the start, given the trouble I've had figuring out how to store and update the state of nodeCounts/Indexes. This won't solve #7, of course, but would at least make it easier to make a simple "child -> parent" lookup without going through the mess that is ReactDOMFragment...The main difficulty here would then be turning
into:
I wonder if making frag turn into an array under the hood would be the best way to do it...
Oh, and I guess this would mean
CompositeComponent
now also has to be aReactMultiChild
-using component. That could be... interesting...The text was updated successfully, but these errors were encountered: