Open
Description
just curious if this is true when consumer component is displayed, it'll render twice ?
The reason i'm having this question is that by reading
const useContext = hook(class extends Hook {
call() {
if(!this._ranEffect) {
this._ranEffect = true;
if(this._unsubscribe) this._unsubscribe();
this._subscribe(this.Context);
this.el.update();
}
}
I wonder if call
is called after the update, and then inside there's a second el.update
.
For the withProviderValue
test, i put console.log all all stages, i got the following,
...set value
render
constructor
update
_subscribe
value 3
call
_subscribe
value 3
render
update
call
teardown
I'm convinced that the effect
does trigger second render which calls to subscribe again. Could you share a bit insight on what is the reason to add that extra effect
? thank you.
Metadata
Metadata
Assignees
Labels
No labels