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

Support React 19 in App and Pages router #65058

Merged
merged 36 commits into from May 7, 2024
Merged

Support React 19 in App and Pages router #65058

merged 36 commits into from May 7, 2024

Commits on May 7, 2024

  1. Start syncing with Beta

    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    618ceee View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    84ef617 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cf89684 View commit details
    Browse the repository at this point in the history
  4. Use react-dom directly instead of server-rendering-stub

    No longer needed now that facebook/react#28271 exists
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    41a97c3 View commit details
    Browse the repository at this point in the history
  5. Inline tests for integration/react-18

    Adds indirection when trying to find a failing test or focusing on one.
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    6e8445c View commit details
    Browse the repository at this point in the history
  6. Alias JSX runtime

    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    2009625 View commit details
    Browse the repository at this point in the history
  7. Use React 19 everywhere

    During Beta, supporting both React 18 in Pages router and React 19 in App router would be very complicated.
    Instead, we just support a single version.
    Once 19 is stable, we will widen support to 19.x in Pages router.
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    37cf4c9 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7c388cf View commit details
    Browse the repository at this point in the history
  9. useFormState -> useActionState

    Kept the transform support since useFormState still exists.
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    6cd9405 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    603dc09 View commit details
    Browse the repository at this point in the history
  11. Implement fetch cache

    Was originally implemented by React.
    Unclear if this is entrypoint is sufficient.
    But at least it works in `test/e2e/app-dir/app/`'s /react-fetch/server-component page.
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    0d0aa62 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    82f1e90 View commit details
    Browse the repository at this point in the history
  13. Fix image tests

    - fixed brittle onLoad test (see #37993)
    - src="" is now omitted
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    7cb4d22 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    dd32f40 View commit details
    Browse the repository at this point in the history
  15. Work around React bugs

    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    2275c7d View commit details
    Browse the repository at this point in the history
  16. Disable StrictMode tests

    until we fix modern StrictMode
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    d6699ee View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    6ed9c92 View commit details
    Browse the repository at this point in the history
  18. Update test assuming we use Canary

    We use Beta now
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    37338f1 View commit details
    Browse the repository at this point in the history
  19. Stop using legacy root

    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    8e17b5e View commit details
    Browse the repository at this point in the history
  20. Pages Router: Fix error overlay

    Same changes we did for App Router in fd04461
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    7a62dc7 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    64aa113 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    5664c85 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    92ca39b View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    e7ce7c0 View commit details
    Browse the repository at this point in the history
  25. Update compiled

    Seems like just chunk ids changed.
    Probably when I changed some Webpack config?
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    cb1c174 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    8ec7f27 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    7659179 View commit details
    Browse the repository at this point in the history
  28. Apply react 19 stack and diff (#65276)

    huozhi authored and eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    d7c9949 View commit details
    Browse the repository at this point in the history
  29. Restore collapse/expand for hydration diffs

    May be not necessary for hydration diffs to expand.
    But also doesn't hurt to include?
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    30628ff View commit details
    Browse the repository at this point in the history
  30. Pages router handles hydration errors as runtime errors

    This was already the case on canary.
    We just need to rewrite this whole feature.
    There are too many places interceptiong error events and console error.
    And then we fork on top of that between App router and pages router.
    
    Should be done after landing the sync.
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    d453769 View commit details
    Browse the repository at this point in the history
  31. Stop using next/head for scripts

    We warn specifically because it's not compatible with Suspense and streaming.
    Using next/head results in `window.scriptExecutionIds` to resolve to ['src-1.js', 'src-1.js']
    
    For inline scripts we document this: https://nextjs.org/docs/messages/inline-script-id
    eps1lon committed May 7, 2024
    Configuration menu
    Copy the full SHA
    330b523 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    12b9753 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    2cc6777 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    3e4de91 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    635e901 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    71ab968 View commit details
    Browse the repository at this point in the history