Svelte · Middle · Question 17 of 75
Why are attachments more flexible than actions?
- ✓Correct answer: They re-run when reactive values they read change, can be conditional (
{@attach cond && fn}) and can be passed to components - 2They run on the server
- 3They don't need a DOM element
Explanation
Library actions can be converted with fromAction from svelte/attachments.