Hello folks! It's been a while since I published an article. So today I'm going to explain how I structure my NextJS projects. Note: There is no right or wrong way to structure a Next JS project, and this is highly opinionated. So, the structure o...

Markdown supported · ⌘↵ to post
Don't use this
- components/index.js
export * from "./Header.jsx";
export * from "./Hero.jsx";
export * from "./Footer";
It will increase size when bundle source. You should use lazy load for components
I would include a screens folder to split up your pages into multiple parts like Hero, CTA, etc.
This allows the page files to delegate while keeping the component library free of components that might only ever be used in one page.
Yousef Medhat
Computer Science student
Very helpful, thank you Anurag.
I would like to know how to structure the styles files?