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

Non-blocking state update

$
0
0

there! I was wondering if Svelte has a way to update state in a non-blocking fashion.Here's artifically slow tabs example. https://svelte.dev/repl/565c333f0ab141c1a97e96f855d2e7d0?version=4.2.12

As you can see, when you switch Tab 2, it prevents tab button from being active until tab content rendering finishes.It makes the UI feel less snappy.

I was seeking something like useTransition in React: https://react.dev/reference/react/useTransition#marking-a-state-update-as-a-non-blocking-transition

Thanks in advance!


Viewing all articles
Browse latest Browse all 1541

Trending Articles



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