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 for React Router 7 #782

Closed
fobos531 opened this issue Nov 22, 2024 · 9 comments · Fixed by #785
Closed

Support for React Router 7 #782

fobos531 opened this issue Nov 22, 2024 · 9 comments · Fixed by #785
Labels
adapters/react-router Uses the React Router adapter feature New feature or request released on @beta released

Comments

@fobos531
Copy link

Context

What's your version of nuqs?

2.2.2

What framework are you using?

  • ✅ React Router

Which version of your framework are you using?

7.0.1

Description

React router v7 was now released. See: https://reactrouter.com/

It seems react-router-dom is no longer a thing, everything now lives inside react-router. With that said, the existing adapter is no longer compatible with react router 7.

Reproduction

  1. Install react router 7
  2. Attempt to use nuqs' react router adapter
@fobos531 fobos531 added the bug Something isn't working label Nov 22, 2024
@franky47 franky47 added feature New feature or request adapters/react-router Uses the React Router adapter and removed bug Something isn't working labels Nov 23, 2024
@franky47
Copy link
Member

I don't get it, their docs mention it's not a breaking change, but changing the package name is the breakiest of the changes..

I'd say the best way to handle this in nuqs is to have two adapters, one for v6 and one for v7:

  • nuqs/adapters/react-router: v6 to avoid a breaking change in nuqs
  • nuqs/adapters/react-router/v7: explicit support for v7
  • nuqs/adapters/react-router/v6: alias of nuqs/adapters/react-router to help with transition

In the next major update of nuqs, we can then swap what nuqs/adapters/react-router point to.

@teukuamru
Copy link
Contributor

I don't get it, their docs mention it's not a breaking change, but changing the package name is the breakiest of the changes..

I'd say the best way to handle this in nuqs is to have two adapters, one for v6 and one for v7:

  • nuqs/adapters/react-router: v6 to avoid a breaking change in nuqs
  • nuqs/adapters/react-router/v7: explicit support for v7
  • nuqs/adapters/react-router/v6: alias of nuqs/adapters/react-router to help with transition

In the next major update of nuqs, we can then swap what nuqs/adapters/react-router point to.

Any updates when will this be implemented?

@franky47
Copy link
Member

Would you like to open a PR?

@teukuamru
Copy link
Contributor

teukuamru commented Nov 28, 2024

Would you like to open a PR?

I have open a PR but this is my very first time opening a PR to an open source project. So feel free to add feedbacks because I know there will be a lot

@franky47 franky47 added this to the 🪵 Backlog milestone Nov 28, 2024
@franky47
Copy link
Member

Thanks and congrats for your first PR! ❤️

@omarkhatibco
Copy link

@franky47, could you please share when you could ship this?

@franky47
Copy link
Member

franky47 commented Dec 16, 2024

@omarkhatibco hopefully this week, now that tests have been merged in #807, they confirmed a few issues:

Copy link

🎉 This issue has been resolved in version 2.3.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

github-actions bot commented Jan 1, 2025

🎉 This issue has been resolved in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters/react-router Uses the React Router adapter feature New feature or request released on @beta released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants