Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

svelte resolve if statement during animation

$
0
0

I have some svelte code that simplified looks like this

{#if conditional}<ContentA/>{:else}<ContentB/><Drawer transition:fly><Compontent /></Drawer>{/if}

in most situations this works fine.But if the component modifies the conditional in some way then I am getting a behavior that I am not too fond of. Since the component has a fade out it will show ContentB until the animation is done, and only after that will it switch to ContentA.

Is there any way of getting this working with both an animation and an instant switch of content?


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>