Choose semantically clear and consistent names across related elements in your codebase. Names should convey their purpose without requiring additional context or explanation, and related elements should follow consistent naming patterns.
Choose semantically clear and consistent names across related elements in your codebase. Names should convey their purpose without requiring additional context or explanation, and related elements should follow consistent naming patterns.
Key principles:
folder
vs directory
where folder
aligns with native behavior)icon-position.tsx
to icon-placement.tsx
)#inputsearch
over #inputsearch-1
)Example:
// Good: Semantic and consistent naming
<code src="./demo/icon-placement.tsx">Icon Placement</code>
// Bad: Inconsistent between filename and display
<code src="./demo/icon-position.tsx">Icon Placement</code>
This ensures code is self-documenting and maintainable, reducing confusion for developers who encounter the code without prior context.
Enter the URL of a public GitHub repository