
This is going to be Lit 🔥
JS Party: JavaScript, CSS, Web Development
00:00
JavaScript Template Instantiation for Fast Updates
Each template that you have in lit, you are maintaining what is essentially a lookup table. And here's a pointer to where this lives in the DOM so I can update it as fast as humanly possible. So we've been working with Apple and Chrome on a couple of proposals called template instantiation or DOM parts. It lets us pretty trivially handle the case we have like a sub template, but it's a conditional and you're swapping between two sub templates. If the condition swinches and you render a new one, we're like, have we rendered this template here? The answer is no. Clear that and start the process over again.
Play episode from 12:15
Transcript


