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

Update React Router to v7 #14253

Open
ErlingHauan opened this issue Dec 9, 2024 · 0 comments
Open

Update React Router to v7 #14253

ErlingHauan opened this issue Dec 9, 2024 · 0 comments
Labels
frontend status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. team/studio-core

Comments

@ErlingHauan
Copy link
Contributor

ErlingHauan commented Dec 9, 2024

Description

The latest version of React Router (v6.28) triggered console.warn() for updates planned in the next major version (v7), which caused 290 tests to fail. The warnings were as follows:

React Router Future Flag Warning: Relative route resolution within Splat routes is changing in v7. You can use the v7_relativeSplatPath future flag to opt-in early.
React Router Future Flag Warning: React Router will begin wrapping state updates in React.startTransition in v7. You can use the v7_startTransition future flag to opt-in early.

A temporary fix has been added to setupTests.ts:

failOnConsole({
  shouldFailOnWarn: true,
  silenceMessage(message) {
    return /React Router Future Flag Warning/.test(message); // TODO: remove when react router has been updated to v7
  },
});

silenceMessage should be removed once the package has been updated.

Here is an overview of potential code changes.

@ErlingHauan ErlingHauan added team/studio-core frontend status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. labels Dec 9, 2024
@ErlingHauan ErlingHauan moved this to 📈 Todo in Team Studio Dec 10, 2024
@ErlingHauan ErlingHauan removed the status in Team Studio Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend status/ready-for-specification Status: Used for issues that are ready for functional decription og detailed design. team/studio-core
Projects
Status: No status
Development

No branches or pull requests

1 participant