S
SolidJS14mo ago
deluksic

Nesting startTransition calls arbitrarily

Can I nest startTransition(() => { setState(); startTransition(() => setState()) }) calls arbitrarily? In the last few days I've been playing with transitions a lot. I'm pretty sure it is ok, as it worked in a few examples I tried. Does anyone know for sure? Reasons to do this could be multiple, but sometimes code reuse can do this to you.
2 Replies
lxsmnsyc
lxsmnsyc14mo ago
You can, but it will be flattened in a sense that only the top-level call would matter
deluksic
deluksicOP14mo ago
thank you!
Want results from more Discord servers?
Add your server