Feature Slice
Feature folder pattern
For route features such as login, register, MFA, and team members, use:
Responsibilities
{feature}.page.tsxUI rendering, field wiring, event hookups.{feature}.handler.tsForm state, query/mutation orchestration, navigation and side effects.{feature}.schema.tsZod validation and inferred form data type.
Why this split matters
- Keeps pages easy to scan and test.
- Makes data flows explicit and reusable.
- Prevents UI components from accumulating API and business rules.
Examples in this repo
src/features/loginsrc/features/registersrc/features/mfasrc/features/advanced-formsrc/features/team-members