set signal batched intermediate sets are lost for animation
This logs only 5, but think about a scenario where I control the klasses of a div, with animation. first I want to reset the animation so I set the signal to undefined, then I set it to three to add the three klass, then five klass.
how does this supposed to be done?
2 Replies
In this case you want to use transitions:
https://playground.solidjs.com/anonymous/5b1e6e5c-f4f8-4680-b0a4-a2d93832097f
Solid Playground
Quickly discover what the solid compiler will generate from your JSX template
the most simplest solution that comes to mind is
1. to have a list of class that applies the css transition
2. then on
transitionend
, apply the next class if there's any or loop if desired
like this
https://playground.solidjs.com/anonymous/0eb3b059-e708-4f77-ba46-f3934e703b4b