After building a discrete tween store, it occurred to me that the most common use cases are:
- The store returns a single value that changes over time based on
duration
anddelay
- The store maintains a stack of all previous states. It’s like having animated state mutation.
- The store value is a set, each step in the animation can have a
key:
, and only the latest value for a key is maintained.
Code
https://svelte.dev/repl/d3ef8bddaca84c0d995282fa526cd264?version=3.38.2