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

Throw if React and React DOM versions don't match #29236

Merged
merged 2 commits into from
May 28, 2024

Commits on May 28, 2024

  1. Throw if React and React DOM versions don't match

    Throw an error during module initialization if the version of the
    "react-dom" package does not match the version of "react".
    
    We used to be more relaxed about this, because the "react" package
    changed so infrequently. However, we now have many more features that
    rely on an internal protocol between the two packages, including Hooks,
    Float, and the compiler runtime. So it's important that both packages
    are versioned in lockstep.
    
    Before this change, a version mismatch would often result in a cryptic
    internal error with no indication of the root cause.
    
    Instead, we will now compare the versions during module initialization
    and immediately throw an error to catch mistakes as early as possible
    and provide a clear error message.
    acdlite committed May 28, 2024
    Configuration menu
    Copy the full SHA
    8dd152f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38bc3c5 View commit details
    Browse the repository at this point in the history