Why use custom router in the project? #130
-
Thanks for sharing this wonderful project, I am a newcomer, I know that NextJS has file-system based router, so why use custom routing in This question puzzled me for some time, can not understand, could you please give me some opinion? Thank you so much! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi @winner106, I converted the issue as a discussion so it is better for us to manage the real issues. We do not use the Next.js router because it does not allow nested routes layout like I hope everything is clear. Feel free to ask more questions if needed. 😊 |
Beta Was this translation helpful? Give feedback.
-
@yoannfleurydev Does this change with the introduction of the app directory structure and layouts in Next.js 13+? |
Beta Was this translation helpful? Give feedback.
Hi @winner106, I converted the issue as a discussion so it is better for us to manage the real issues.
We do not use the Next.js router because it does not allow nested routes layout like
react-router-dom
can offer (as explained in the README, we might improve this part in the future). At @BearStudio, we mostly use this project to generate back office applications that does not require the Next.js Routing and Server Side Rendering, so we made the choice to usereact-router-dom
for theapp
part that is provided by theapp.js
page that use the Next.js routing.I hope everything is clear. Feel free to ask more questions if needed. 😊