Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 334 Bytes

prefer-file-to-function-granularity.md

File metadata and controls

7 lines (4 loc) · 334 Bytes

Rationale

As a codebase grows, it's important to consider discoverability and navigability of existing code.

Principle

Each exported function/class/component should exist in its own identically named file. This makes it easy to discover and navigate the codebase without having to look inside a file to see what it offers.