-
I see this template uses stub pages in src/pages that just point to src/components/pages. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @mattkrick 👋 Your guess is one of the reasons, another reason is If someday I'd like to copy pages components into another project which maybe not using next.js (for example vite with react-router or remix), I'd just need to copy Portability and to separate which folder is next.js specific (src/pages) and which are not (src/lib) I'm open for suggestions though. I've been tinkering with various foldering conventions and finding sweet spot in |
Beta Was this translation helpful? Give feedback.
Hi @mattkrick 👋
Your guess is one of the reasons, another reason is
/pages
folder in next.js have its own rules (for how to defined the page, embedding GSSP, GSSR, etc).If someday I'd like to copy pages components into another project which maybe not using next.js (for example vite with react-router or remix), I'd just need to copy
lib
folder and re-create the/pages
file conforming with the other project's rules.Portability and to separate which folder is next.js specific (src/pages) and which are not (src/lib)
I'm open for suggestions though. I've been tinkering with various foldering conventions and finding sweet spot in
src/lib
andsrc/pages
foldering structure (highly influenced by…