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

feat: Shallow routing for everyone #811

Merged
merged 23 commits into from
Dec 17, 2024
Merged

Conversation

franky47
Copy link
Member

@franky47 franky47 commented Dec 16, 2024

Enable shallow routing support in:

  • Remix
  • React SPA
  • React Router v6
  • React Router v7

For some of these, patching the History API methods will be necessary to spy on external calls from first/third party code. This will be provided as an opt-in method exported from the adapters, to call in top-level client code.

Tasks

Copy link

vercel bot commented Dec 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuqs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 17, 2024 7:55pm

Copy link

pkg-pr-new bot commented Dec 16, 2024

Open in Stackblitz

npm i https://pkg.pr.new/nuqs@811

commit: acbdf28

packages/e2e/remix/app/routes/ssr.tsx Outdated Show resolved Hide resolved
packages/e2e/remix/cypress/e2e/shared/routing.cy.ts Outdated Show resolved Hide resolved
packages/e2e/shared/specs/shallow.cy.ts Outdated Show resolved Hide resolved
It's needed for frameworks that want to be reactive to any
change in the search params, even coming from 1st/3rd party
code calling the history API directly.
URL.canParse isn't available in Cypress, so we consider it unavailable
in client code too, and replace it with a bespoke implementation that
extracts search params from whatever can be fed to the history API.
@franky47 franky47 force-pushed the feat/shallow-routing-for-everyone branch from 6e7195e to acbdf28 Compare December 17, 2024 19:52
@franky47 franky47 merged commit abbbb56 into next Dec 17, 2024
26 checks passed
@franky47 franky47 deleted the feat/shallow-routing-for-everyone branch December 17, 2024 20:10
Copy link

🎉 This PR is included 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 PR is included in version 2.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@franky47 franky47 mentioned this pull request Jan 3, 2025
@franky47 franky47 removed this from the 🚀 Shipping next milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant