-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dynamic component transitions #1568
Comments
outro when <svelte:component> switches -
implemented in 2.9.0, albeit without the new |
is this implemented in v3+? |
@northkode Check #1569, it's default behaviour in v3. The |
I'm having trouble getting the Here's a REPL that demonstrates the problem: https://svelte.dev/repl/5094a42378e742a8a9b7cb92915ebe72?version=3.55.1 I assume the dynamic component isn't loaded when the transition tries to first run. Is there a way I can enforce this? Adding a delay as mentioned on Stackoverflow didn't seem to help. This is a greatly simplified example of what I'm trying to accomplish, but happy to flesh out some details if you're having trouble understanding my use-case. Thank you! |
REPL.
In a case like this...
...outro transitions are not played when the value of
X
changes.In some situations we would want the before and after components to exist side-by-side (i.e. outro and intro happen simultaneously), in others we'd want out-then-in. In rare cases we might want in-then-out.
We could maybe do this by adding a directive unique to
<svelte:component>
, borrowing from Vue's transition modes:The default behaviour (when no
switch
directive is used) would be forin
andout
transitions to begin simultaneously.Thoughts?
The text was updated successfully, but these errors were encountered: