Making page router to default and using app router for new development
Unanswered
RS posted this in #help-forum
RSOP
I working on project where currently we are using both the router in same app. since nextjs by default consider app router as the entry point my main page is in page router.
looking to give preference to page router.
Is it possible to?
looking to give preference to page router.
Is it possible to?
6 Replies
Can't understand you question properly, both routers can colocate together, but both can't have same paths. So if a path is in app dir, it will render in app dir, if it is in pages dir, it will render in pages dir. You don't need to do extra config
RSOP
but in that case my entry page is not getting pre-rendered even when i have used getstaticprops
you can share more details, about how you are using it, and what's the problem exactly.
your initial question was way off your problem
RSOP
my entry point is in page router and I’m using react query v5 to prefetch the data in getstaticprops
but when i run the project i het empty data over there
but when i run the project i het empty data over there
again, not clear without code