Skip to content

Reconciler: Don't retry synchronous render#41

Draft
everettbu wants to merge 4 commits into
mainfrom
error-boundary-double-commit-26518
Draft

Reconciler: Don't retry synchronous render#41
everettbu wants to merge 4 commits into
mainfrom
error-boundary-double-commit-26518

Conversation

@everettbu

@everettbu everettbu commented Dec 12, 2025

Copy link
Copy Markdown

Mirror of facebook/react#28810
Original author: eps1lon


Summary

In react/react#13041 we started retrying the render synchronously if a render threw during a concurrent render. However, this also applied to synchronous renders which should help very rarely since we don't support mutations during render. The original PR even explicitly said that a synchronous render should not be retried. We also didn't used to retry in legacy roots: https://react-error-recovery-showcase.vercel.app/

A lot of tests asserted on the retry even though their render was sync i.e. not wrapped in startTransition.

I originally caught this while investigating duplicate host instance creation in error boundary fallbacks. But this is expected by proxy of having error recovery for sync renders. Host instances are created during render phase.

How did you test this change?

@everettbu everettbu added CLA Signed React Core Team Opened by a member of the React Core Team labels Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants