Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flushSync: Exhaust queue even if something throws #26366

Merged
merged 1 commit into from
Mar 10, 2023

Commits on Mar 10, 2023

  1. flushSync: Exhaust queue even if something throws

    If something throws as a result of `flushSync`, and there's remaining
    work left in the queue, React should keep working until all the work
    is complete.
    
    If multiple errors are thrown, React will combine them into an
    AggregateError object and throw that. In environments where
    AggregateError is not available, React will rethrow in an async task.
    (All the evergreen runtimes support AggregateError.)
    
    The scenario where this happens is relatively rare, because `flushSync`
    will only throw if there's no error boundary to capture the error.
    acdlite committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    bbbc66b View commit details
    Browse the repository at this point in the history