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

[Bug]: next-usequerystate/nuqs "invariant expected app router to be mounted" #25612

Closed
isBatak opened this issue Jan 16, 2024 · 1 comment
Closed

Comments

@isBatak
Copy link

isBatak commented Jan 16, 2024

Describe the bug

next-usequerystate/nuqs lib is using next/navigation and it can be used in both app and pages folder.
https://github.com/47ng/nuqs/blob/f0f6de78950e0dca987d94533b99ebb8f745f4e9/packages/nuqs/src/useQueryState.ts#L1

Components that uses useQueryState inside pages folder are not working in storybook.

image

To Reproduce

CodeSandbox Link

System

"next-usequerystate": "1.15.2"
"storybook": "7.6.8"
"@storybook/nextjs": "7.6.8"


Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.1.0: Mon Oct  9 21:28:45 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6020
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 3.2.3
  pnpm: 8.6.12
Relevant Packages:
  next: 14.0.4
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.2.2
Next.js Config:
  output: N/A

Additional context

Related issue on next-usequerystate repo 47ng/nuqs#460

@shilman
Copy link
Member

shilman commented Jan 16, 2024

closing as dupe to #24722

@shilman shilman closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants