S
SolidJS15mo 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
lxsmnsyc15mo ago
You can, but it will be flattened in a sense that only the top-level call would matter
deluksic
deluksicOP15mo ago
thank you!
Want results from more Discord servers?
Add your server