Closed justinbmeyer closed 5 years ago
For 5.0, I think we should create the .disconnect()
method so folks can at least teardown manually if they need to.
new ChildComponent({
initializeBindings: false,
viewModel: {
prop: value.from(this, "parentProp");
}
});
If we do something like:
This will create a memory leak because the ChildComponent will be listening on the parent component's
parentProp
.I propose that components only "activate" once they are in the DOM. For testing, I suggest we add a
.connect()
and.disconnect()
method that will "activate" and call theviewModel.connectedCallback()
method.I think this might be a breaking change, though I would bet $$$$ that I'm the only one using this feature currently.