Next.js Discord

Discord Forum

Switched from CRA to nextjs and have troubles with direct links

Unanswered
Willow Ptarmigan posted this in #help-forum
Open in Discord
Avatar
Willow PtarmiganOP
I switched from CRA to Nextjs and for now i just have a app/[[...slug]] approach. The structure of the application is not yet using the pages/ folder routing as it should with nextjs. Everything works good so far though but i have problems when using direct links. The pages work fine if i start from the root page. But any other page is not working when refreshing the page or using direct links. What options do i have or what do i have to do ?
At the moment i still use the react-router-dom

1 Reply

Avatar
Great-tailed Grackle
someone mentioned this on the other post relating to using react-router with nextjs:
https://github.com/colinhacks/nextjs-react-router

but i suggest to just use next's built in file based routing system