Open kryptn36 opened 3 years ago
What do you mean?
I mean the "crossfade" transition under Svelte Transitions to do something like this.
Yes it's supported
If you have problems with using it, feel free to open an issue!
Hey! First of all, thank you for this project - I'm sorry to dig up this old issue.
However, I think crossfades indeed do not work. I set up a pathological example of a left and right text that should be moving back and forth. If I include the two components manually using an {#if} on my own boolean, the transition works fine. Heck, even if I use the {#if} on svelte-spa-router's location
export, it works. But it is when I switch to using <Router>
that it stops working.
My guess would be that there's some sort desync happening here, that one element disappears before the other one appears, and therefore it can't find a match. NOTE: One important thing is that the send/receive functions used by the crossfades are the same, so put them in a separate .ts file or whatever and import those. So yeah, that part's figured out and that's not the culprit.
I wish I could send you a link to a Svelte REPL demonstrating this, however, the iframes there do not allow router navigation. But this example should only take about 10 minutes to reproduce.
Reopened
Hey :smile: Looks like crossfade isn't supported. Or am i wrong?