3 ms·
Thanks for your great work. I can't find clear information about how re-rendering and stateful third-party components interact. Let's say I have a stateful da
by mkleczek 1y ago
Thanks for your great work.
I can't find clear information about how re-rendering and stateful third-party components interact.
Let's say I have a stateful data table web component that I use in the template. Is it going to be re-created every time the template is re-rendered (loosing its internal state)?
- jfagnani 1y agoThanks! Elements are kept stable as long as the template containing them is rendered. The template docs try to get this across by saying that Lit "re-render only the parts of template that have changed." Maybe that needs more detail. There are details here: https://github.com/lit/lit/blob/main/dev-docs/design/how-lit-html-works.md https://github.com/lit/lit/blob/main/dev-docs/design/how-lit...