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
lxsmnsyc8mo ago
You can, but it will be flattened in a sense that only the top-level call would matter
deluksic
deluksic8mo ago
thank you!