-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
I noticed that the setState callback currently updates not only the affected node, but all of it's siblings.
Line 134 in ddd6d50
| render(vnodes, dom), // And then we call-out to the re-render function |
State updates are synchronous, so imagine you have to update 10 sibling components - each component calls setState and triggers updates of all the other component, so a total of 10*10 = 100 updates.
Since the function signature is render(vnodes, dom), it looks like there's currently no way to update an individual child node.
Likely this needs to be refactored, something like extracting a function renderNode(vnode, domParent, domChild) and calling that from the setState closure instead?
Metadata
Metadata
Assignees
Labels
No labels