Next.js Discord

Discord Forum

Help with likely a bug in the router

Unanswered
Mugger Crocodile posted this in #help-forum
Open in Discord
Avatar
Mugger CrocodileOP
Hey everyone

in our next app we need to use a page called index with multiple sub paths.
For this purpose we are using default pages routing and created a directory called index with required sub directory and files.

The problem is we are facing a refresh when we call router.push('/index/1') , but after the refresh, our page is shown.

We are expecting the page to not refresh on router push or link click.

this seems to be a bug because it only happens when we use the word index and it works when we change the directory to something else.

Here is the link to the Github issue including a repro repository which you can try:
https://github.com/vercel/next.js/issues/55174

We are also using a workaround which is using a catch all route to handle our page but this is not that clean and requires extra work.

2 Replies

Avatar
Clown
I'm not sure if pages dir is actively being developed anymore.
It its still happening in App router tho, then i guess you can only wait