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

Avoid accumulating hydration mismatch errors after the first hydration error #24427

Closed
wants to merge 13 commits into from

Commits on Apr 22, 2022

  1. Avoid accumulating hydration mismatch errors after the first hydratio…

    …n error
    
    If there is a suspended component or an error during hydration there will almost certainly be many additional hydration mismatch errors because the hydration target does not pair up the server rendered html with an expected slot on the client. To avoid spamming users with warnings there was already logic in place to suppress console warnings if such an occurrence happens. This commit takes another approach to avoid queueing thrown errors.
    
    when suspending this isn't that big of an issue becuase queued errors are discarded becasue the suspense boundary does not complete.
    
    When erroring within a resolved suspense boundary however the root completes and all queued errors are upgraded to recoverable errors and in many cases wihll flood the console. What is worse is the console warnings which offer much more specific guidance on what went wrong (in dev) are suppressed so the user is left with very little actionable information on which to go on and the volume of mismatch errors may distract from identifying the root cause error
    
    The hueristic is as follows
    
    1. always queue the first error during hydration
    2. always queue non hydration mismatch errors
    2. discard hydration mismatch errors before queueing If there is an already queued error or any type
    gnoff committed Apr 22, 2022
    Configuration menu
    Copy the full SHA
    0f8775a View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2022

  1. Reduce uncaught errors caused by IGC and refactor mismatch errors to …

    …not use error properties
    gnoff committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    72fa9bb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    136a2ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4783e68 View commit details
    Browse the repository at this point in the history
  4. catch up forks

    gnoff committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    3773d00 View commit details
    Browse the repository at this point in the history
  5. merge workloop fork

    gnoff committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    f15c5f2 View commit details
    Browse the repository at this point in the history
  6. fix import

    gnoff committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    9648314 View commit details
    Browse the repository at this point in the history
  7. fix test gates

    gnoff committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    f531201 View commit details
    Browse the repository at this point in the history
  8. more gates

    gnoff committed Apr 28, 2022
    Configuration menu
    Copy the full SHA
    a84b1ad View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e74488b View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2022

  1. Configuration menu
    Copy the full SHA
    87d8ef5 View commit details
    Browse the repository at this point in the history
  2. improve tests

    gnoff committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    0489ee0 View commit details
    Browse the repository at this point in the history
  3. fix forks

    gnoff committed Apr 29, 2022
    Configuration menu
    Copy the full SHA
    d016d50 View commit details
    Browse the repository at this point in the history