Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Children can't be modified without instantiating new component instances? #53

Open
trusktr opened this issue May 31, 2017 · 1 comment

Comments

@trusktr
Copy link

trusktr commented May 31, 2017

For example, since a component constructor receives children in the second arg, then if children ever change, the only way to have it updated is constructing a new instance? This is unlike React, where the instance is kept alive, and this.props.children is modified. Could this be hint that new instances are being created when maybe there's an alternate way to avoid creating new instances (and thus reduce overhead)?

(same with props if those are only received through constructor)

@zaygraveyard
Copy link
Contributor

As patch.js:52 suggests, the update() method of the component is passed the new props and children as params.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants