You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a mobile web app with tabs and stack navigation, so I need Offscreen or React Freeze (https://github.com/software-mansion/react-freeze, simulates Offscreen using Suspense). If I also use startTransition, the updates within startTransition never get rendered.
React version: 18.3.1
Steps To Reproduce
Have a component that suspends indefinitely (e.g. frozen using React Freeze)
React waits for the frozen component to unsuspend before completing the transition.
The expected behavior
React ignores the frozen component and completes the transition as if the frozen component wasn't there.
Additional info
I don't want transitions to wait for suspended components, I'm just using startTransition for time slicing. I know it was intentional to make transitions wait for suspended components to avoid showing too many spinners, but not everyone wants that, I think there should be a way to enable time slicing without opting in to this feature. I think before, I could've done something like useTransition({ timeoutMs: 0 }), which should've allowed me to complete the transition while ignoring suspense.
With React 18, is there a way to either:
make startTransition not wait for the suspended component OR
enable time slicing without startTransition
The text was updated successfully, but these errors were encountered:
I'm excited about contributing to mobile App project using React . I'd love to help with the issue and would appreciate any guidance you can provide on getting started.I have a humble request to assign me this project.
This is expected, when you infinitely suspend, we can't commit the update. This isn't an issue outside of transitions because we can commit the fallback, but transitions will not commit or display a fallback until the suspense resolves.
I'm building a mobile web app with tabs and stack navigation, so I need Offscreen or React Freeze (https://github.com/software-mansion/react-freeze, simulates Offscreen using Suspense). If I also use
startTransition
, the updates withinstartTransition
never get rendered.React version: 18.3.1
Steps To Reproduce
setState
insidestartTransition
Link to code example: https://codesandbox.io/p/sandbox/blazing-wood-nmw92p
The current behavior
React waits for the frozen component to unsuspend before completing the transition.
The expected behavior
React ignores the frozen component and completes the transition as if the frozen component wasn't there.
Additional info
I don't want transitions to wait for suspended components, I'm just using
startTransition
for time slicing. I know it was intentional to make transitions wait for suspended components to avoid showing too many spinners, but not everyone wants that, I think there should be a way to enable time slicing without opting in to this feature. I think before, I could've done something likeuseTransition({ timeoutMs: 0 })
, which should've allowed me to complete the transition while ignoring suspense.With React 18, is there a way to either:
startTransition
not wait for the suspended component ORstartTransition
The text was updated successfully, but these errors were encountered: