curious how component libraries that don’t have primitives for concurrent rendering (like useTransition, useDeferredValue, Suspense) will approach declarative ViewTransitions.
how do you express in code that you want some state updates to be long-running and async, but others can interrupt them?
how do you express in code that you want some state updates to be long-running and async, but others can interrupt them?
Comments
my state management is redux inspired, but in general everything in the data land is vanilla javascript and the view itself is just a reflection of that state
for the interplay of transitions and state, ... /1
For everything else, any way we need to interrupt in js, we can.
And they also have primitives for asynchronous data and lazy computed data
It's not the same thing as primitives for concurrent rendering, but I believe they can be used to implement declarative ViewTransitions
Or creating a new primitive for simple lazy state
Svelte has approached element-level transitions with "directives" (fancy attributes). https://svelte.dev/tutorial/svelte/transition
for page-level view transitions, their app framework has an imperative "hook": https://svelte.dev/blog/view-transitions#How-onNavigate-works