As far as I know, if startTransition
causes components to suspend, it would wait for those components to unsuspend before completing the transition. However, I don’t want it to do that. I’m using startTransition
just for time slicing and I’m trying to find a way to get it to transition asap rather than wait for suspended components.
E.g. if a transition causes a modal to appear, I’d want a modal with a spinner to appear asap. However, with the current startTransition
, it would wait for the modal to fetch all its files/data dependencies before showing the modal.
Is there a way to either:
- make
startTransition
not wait for the suspended component OR - enable time slicing without
startTransition
Demo of transitions waiting for suspense: https://codesandbox.io/p/sandbox/blazing-wood-nmw92p