11 lines
1.1 KiB
Markdown
11 lines
1.1 KiB
Markdown
## React
|
|
|
|
- Treat the current React version, component style, state management, routing, styling, and test approach as authoritative.
|
|
- Do not perform unrelated class-to-hook, JavaScript-to-TypeScript, state-library, styling-system, or React-to-Next.js migrations.
|
|
- Keep components focused and follow the repository's established split between presentation, state, data access, and side effects.
|
|
- Do not use nested ternary expressions. Use clear `if`/`else` branches, early returns, or well-named intermediate variables instead; a single, non-nested ternary is acceptable only when it remains immediately readable.
|
|
- Keep effects dependency-correct and clean up subscriptions, timers, listeners, and in-flight work where applicable.
|
|
- Use stable semantic keys and preserve accessibility, loading, empty, error, disabled, and success states.
|
|
- Preserve public component props and shared UI contracts unless a coordinated breaking change is explicitly approved.
|
|
- Treat any planned Next.js migration as a separate policy and task; the current React application remains authoritative until that migration slice is approved.
|