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

Shallow routing with query params broken #35845

Closed
1 task done
lgraubner opened this issue Apr 3, 2022 · 3 comments
Closed
1 task done

Shallow routing with query params broken #35845

lgraubner opened this issue Apr 3, 2022 · 3 comments
Labels
Navigation Related to Next.js linking (e.g., <Link>) and navigation. please add a complete reproduction Please add a complete reproduction.

Comments

@lgraubner
Copy link

lgraubner commented Apr 3, 2022

Verify canary release

  • I verified that the issue exists in Next.js canary release

Provide environment information

Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101
Binaries:
  Node: 16.14.0
  npm: 8.5.5
  Yarn: 1.22.18
  pnpm: N/A
Relevant packages:
  next: 12.1.5-canary.0
  react: 17.0.2
  react-dom: 17.0.2

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

When using shallow routing for query params the side fully reloads.

Works in next@12.1.0, breaks from next@12.1.1 ongoing.

Happens locally as well as deployed to fly.io.

Happens in all browsers (tested latest Firefox, Chrome, Safari).

Expected Behavior

Changes URL without reloading the page.

To Reproduce

router.push({
    pathname: '/',
    query: {
      tab: 'faq'
    }
  },
  undefined,
  {
    shallow: true
  }
);
@lgraubner lgraubner added the bug Issue was opened via the bug report template. label Apr 3, 2022
@balazsorban44 balazsorban44 added please add a complete reproduction Please add a complete reproduction. Navigation Related to Next.js linking (e.g., <Link>) and navigation. and removed bug Issue was opened via the bug report template. labels Apr 5, 2022
@gregkohn
Copy link

While we did not experience this as a breaking change between the versions you mentioned, we were running into a similar issue with shallow routing causing a reload. In case it's helpful, we finally tracked down our issue to next-i18next, specifically with serverSideTranslations in getStaticProps().

Here's a related issue: i18next/next-i18next#1023

@balazsorban44
Copy link
Member

This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think this was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Navigation Related to Next.js linking (e.g., <Link>) and navigation. please add a complete reproduction Please add a complete reproduction.
Projects
None yet
Development

No branches or pull requests

3 participants