Is it best practice to create a directory in app that is not related to Routing?
Unanswered
Ryota Murakami posted this in #help-forum
I have completed the Learn Next course, and I am concerned that it created files such as
Personally, I think it is best practice to place in app only the folder that will be the routing path, files with special names that affect the behavior of the App Router, and co-locations of one off files used on specific page.tsx that start with an underscore _foo.
I believe that this is the best practice.
I would be happy to share your thoughts!
lib and ui that are not related to Routing directly under the app directory.Personally, I think it is best practice to place in app only the folder that will be the routing path, files with special names that affect the behavior of the App Router, and co-locations of one off files used on specific page.tsx that start with an underscore _foo.
I believe that this is the best practice.
I would be happy to share your thoughts!
3 Replies
yea, that#s also a possible way
you can do it like you want to do
nextjs haven't any strict folder structure. Only for the routing there is a strict folder structure 🙂