dillon1000/react

Commit

[Fiber] Adjust the suspensey image/css timeout based on already elapsed time (#34478)

Currently suspensey images doesn't account for how long we've already
been waiting. This means that you can for example wait for 300ms for the
throttle + 500ms for the images. If a Transition takes a while to
complete you can also wait that time + an additional 500ms for the
images.

This tracks the start time of a Transition so that we can count the
timeout starting from when the user interacted or when the last fallback
committed (which is where the 300ms throttle is computed from). Creating
a single timeline.

This also moves the timeout to a central place which I'll use in a
follow up.
Browse files
Changed paths9 files
First-parent comparison
M packages/react-art/src/ReactFiberConfigART.js ModifiedM packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigFabric.js ModifiedM packages/react-native-renderer/src/ReactFiberConfigNative.js ModifiedM packages/react-noop-renderer/src/createReactNoop.js ModifiedM packages/react-reconciler/src/ReactFiberTransition.js ModifiedM packages/react-reconciler/src/ReactFiberWorkLoop.js ModifiedM packages/react-reconciler/src/__tests__/ReactFiberHostContext-test.internal.js ModifiedM packages/react-test-renderer/src/ReactFiberConfigTestHost.js Modified
Patch

Files changed

Rendering syntax-highlighted changes…