mirror of https://github.com/sveltejs/svelte
docs: add note about `#key` in best-practices (#18851)
We had this discussion with @teemingc about Astra using a key block as a way to re-render the whole component, which is very inefficient. When you think about it, a key block is actually almost never the right solution unless you want, for example, to rerun the animations. I propose to add this line here in the best practices skill/doc, which, in my opinion, makes sense. We should probably also add the same suggestions whenever we encounter a key block in the MCP Auto Fixer. What do you think about it? --------- Co-authored-by: Rich Harris <rich.harris@vercel.com>main
parent
4c884722f8
commit
7c2fcdae6a
Loading…
Reference in new issue