react-guidelines
Installation
SKILL.md
React Guidelines
This document outlines best practices for building robust, maintainable, and modern React applications with TypeScript.
1. General Principles
- Component Composition: Build small, focused components and compose them to build complex UIs.
- Unidirectional Data Flow: Data flows down (props), actions flow up (callbacks).
- Immutability: Treat state as immutable. Use functional updates and immutable patterns.
- Colocation: Keep related logic, styles, and tests close to the component.
2. TypeScript Integration
- Strict Typing: Always use
strict: trueintsconfig.json. avoidinganyensures type safety. - Props Interfaces: Define explicit interfaces for component props.