4 ms·
From memory it’s because it’s not evaluated in one go. By using functions you can evaluate parts of the dom, which crucially means you can reevaluate parts of
by ojkelly 4y ago
From memory it’s because it’s not evaluated in one go.
By using functions you can evaluate parts of the dom, which crucially means you can reevaluate parts of the dom.
Those functions also enable changing their output based on inputs, enabling data reactivity.
If you had to evaluate the whole tree each time, you’re doing a lot of unnecessary compute.
- brundolf 4y agoSo that applies for custom components, but I'm just talking about the raw base-level elements. For these there's nothing meaningful to "re-evaluate" (or avoid re-evaluating), as far as I know.