How are you structuring your React apps in 2025? #1135
-
Are you sticking to feature-based folders? Using atomic design? Colocating server actions? Curious how others keep large codebases scalable in Next.js or Vite projects. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In 2025, I’m using a feature-based structure with a few modern additions: |
Beta Was this translation helpful? Give feedback.
In 2025, I’m using a feature-based structure with a few modern additions:
🗂 Each feature (e.g., users, products) has its own folder with components, hooks, utils, and server logic.
⚛️ Common components (buttons, modals, layout) live in a shared /components folder—loosely inspired by atomic design.
📡 Server actions and mutations are colocated near the pages that use them (Next.js 14+ pattern).
🧠 Custom hooks stay inside their feature folders for clarity and tight coupling.
📁 Global types, lib, and config folders sit at the root.