You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should probably have better documentation and specs for how renderedCallback works, perhaps similar to Lit's docs on the subject. We could also do a reform of renderedCallback to ensure that it works consistently per the spec. It's a good time to do this, now that native lifecycle has landed in LWC v6, so connectedCallback and disconnectedCallback are both correctly working per the DOM spec.
Other areas to consider in the process:
@wire – lots of people take data from @wire, update state, and then put if checks in renderedCallback that further sets state (despite this being an anti-pattern)
list rendering – can you depend on renderedCallback for all list items when the order changes? (answer: no)
We've seen a few inconsistencies with how
renderedCallback
is called:renderedCallback
fires inconsistently after disconnect+reconnect in native lifecycle #4057renderedCallback
invoked excessively for light DOM components #4013We should probably have better documentation and specs for how
renderedCallback
works, perhaps similar to Lit's docs on the subject. We could also do a reform ofrenderedCallback
to ensure that it works consistently per the spec. It's a good time to do this, now that native lifecycle has landed in LWC v6, soconnectedCallback
anddisconnectedCallback
are both correctly working per the DOM spec.Other areas to consider in the process:
@wire
– lots of people take data from@wire
, update state, and then putif
checks inrenderedCallback
that further sets state (despite this being an anti-pattern)renderedCallback
for all list items when the order changes? (answer: no)Existing SFDC docs on
renderedCallback
The text was updated successfully, but these errors were encountered: