File Naming Conventions
Published Updated
Standard naming conventions for React files, custom hooks, typings, and folders.
Consistent naming rules ensure the project remains organized and allows code generators to import components and types predictably without directory-scanning overhead.
- Components: PascalCase for files and exports (e.g.
OptionSwatch.tsxexportingOptionSwatch). One component per file. - Hooks: camelCase starting with 'use' (e.g.
useOptionGroup.tsexportinguseOptionGroup). - Types: kebab-case with
.types.tssuffix (e.g.option-schema.types.ts). - Feature Folders: lowercase singular (e.g.
configurator,checkout). - Asset Styles: lowercase (e.g.
index.css).