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

fixed react 19 errors #690

Merged
merged 5 commits into from
Sep 2, 2024
Merged

fixed react 19 errors #690

merged 5 commits into from
Sep 2, 2024

Conversation

rezrah
Copy link
Collaborator

@rezrah rezrah commented Aug 12, 2024

Summary

Fixes major bug with React 19 release candidate, which is causing errors in dotcom when using React Next FF.

Makes parts of react-dom full externals of the library, to prevent conflict in React 19+/

What should reviewers focus on?

  • Check our Storybook, which uses React 18 still works okay
  • Check integration tests pass (currently use React 18)

Steps to test:

  1. Storybook

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • New visual snapshots have been generated / updated for any UI changes
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Fixed and tested in Next.js RC

Before After

Screenshot 2024-09-02 at 10 11 10

image

Copy link

changeset-bot bot commented Aug 12, 2024

🦋 Changeset detected

Latest commit: 49ae5c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@primer/react-brand Minor
@primer/brand-primitives Minor
@primer/brand-e2e Minor
@primer/brand-fonts Minor
@primer/brand-config Minor
@primer/brand-storybook Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Aug 12, 2024

🟢 No design token changes found

Copy link
Contributor

github-actions bot commented Aug 12, 2024

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@rezrah rezrah marked this pull request as ready for review September 2, 2024 09:11
Copy link
Contributor

@joshfarrant joshfarrant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Do you think it's worth bumping our Next.js integration test to use the Next 15 RC so we can keep an eye on React 19 compatibility in the pipelines? Once Next 15 reaches GA we can revert so we're not constantly tracking an RC.

@rezrah
Copy link
Collaborator Author

rezrah commented Sep 2, 2024

👍

Do you think it's worth bumping our Next.js integration test to use the Next 15 RC so we can keep an eye on React 19 compatibility in the pipelines? Once Next 15 reaches GA we can revert so we're not constantly tracking an RC.

The current Next.js test is still valid, and arguably more important than the RC as we need to ensure compat with latest stable Next.js. We could create a second integration test though specifically for React 19, and use Next.js RC as the mechanism to verify. That's a good shout, I'll take a look later this week.

@rezrah rezrah merged commit 98fa3a2 into main Sep 2, 2024
18 checks passed
@rezrah rezrah deleted the rezrah/fix-react-19 branch September 2, 2024 13:41
@primer-css primer-css mentioned this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants