Open
Description
Describe the problem
Svelte encourages reactivity at many levels, but when it comes to actions, transitions, or animations, it's rather static:
- you are not allowed to swap out one directive for another at runtime. Doesn't work for actions, does work for transitions/animations only when they are not rendered
- you can't conditionally apply a directive by setting it to undefined; it will throw a runtime error
- attributes are not always updated, related to Transitions: dynamic attributes #3633
Describe the proposed solution
Support swapping out directives
Alternatives considered
Workaround code involving #if
s
Importance
nice to have