Closed nizniz187 closed 2 years ago
The solutions we've tried:
attributeChangedCallback
: failed.
The attributeChanged
will still be triggered on the initial rendering.The best thing we can do may be putting a notice in our documentation:
The update function will be triggered on initial rendering if any attribute is assigned.
After a second thought, we could actually utilize the connectedCallback
to identify whether the component is initialized.
Because the order of triggering would be: constructor
-> attributeChangedCallback
-> connectedCallback
.
I have tried connectedCallback last week, but failed. Maybe we can try again.
Followed by commit #103 & MR #104.