Performance: Folder structure best practices
MEDIUM IMPACT
This affects the maintainability and scalability of the codebase, indirectly impacting developer productivity and build performance.
src/
components/
Button/
Button.jsx
Button.css
Header/
Header.jsx
Header.css
utils/
index.js
data/
data.json
App.jsx
index.jssrc/ App.js index.js Button.js Header.js styles.css utils.js data.json
| Pattern | Build Time Impact | Developer Productivity | Code Maintainability | Verdict |
|---|---|---|---|---|
| Flat folder with mixed files | High - many files in one folder slow indexing | Low - hard to find files | Low - confusing structure | [X] Bad |
| Feature-based folder structure | Low - better caching and incremental builds | High - easy to navigate | High - clear separation | [OK] Good |