Dynamic Routes not work for me. I got 404 error.
Unanswered
Palomino posted this in #help-forum
PalominoOP
8 Replies
Skipjack tuna
Can you provide more details? What's inside your
page.jsx? What URL are you trying etc etcPalominoOP
first of all , it is my first localhost server even when I tried code in docs , it is not workin : export default function Page({ params }: { params: { slug: string } }) {
return <div>My Post: {params.slug}</div>
}
return <div>My Post: {params.slug}</div>
}
for example I tried like here https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes
Blood cockle
Like mentioned, what’s the URL you are trying to access?
PalominoOP
Blood cockle
I see nothing nothing wrong. Any error on the console when you try to access that URL? There are some error notifications in your code editor
Skipjack tuna
I'm sorry but what "not working" does mean? what error you got in the console? What OS are you using? Node version? etc etc... I would love to help, but need more info.
@Palomino http://localhost:3000/adres/keyword
Skipjack tuna
and what is your file structure for this?