-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Open
Labels
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
janosh, bmcmahen, bartektelec, vdawg-git, Prinzhorn and 10 moremacmillen, gyurielf, lukaszpolowczyk, mraxime, bmcmahen and 4 more