Client side navigation #78542
Replies: 2 comments 1 reply
-
This is somewhat of a known issue, #50711, but I think one way you can fix this is demonstrated here: https://stackblitz.com/edit/nextjs-epro13lm?file=app%2Flibrary%2F[packId]%2Fpage.tsx,app%2Flayout.tsx See the file structure: app
├── favicon.ico
├── globals.css
├── layout.tsx
├── library
│ ├── [packId]
│ │ └── page.tsx
│ ├── client.tsx
│ └── layout.tsx
└── page.tsx Notice how there's a layout, as child to |
Beta Was this translation helpful? Give feedback.
-
I have different harder situation so Pack ID is number and inside pack I have routing to audio/video/ book which loaded all at once, and splits on client side. Forked and now with navigation counter resets :( |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
this parse params in form /ID/audio|video|book
and pass it to component which is "use client",
rendering tabs ( audio, vidieo, books)
content loaded inside it with useFetch, its loaded all parts and filtering on client side.
each tab uses Link to navigate correspondently to ID/audio|video|book
Problem - each time i switch audio|video|book - it loaded pack again.
Is it any way to prevent it?
Beta Was this translation helpful? Give feedback.
All reactions