This release adds clearer, centralized guidance for how to write React and TypeScript in this repo, with an emphasis on avoiding patterns that commonly lead to hard-to-debug behavior.
Coding standards now documented
A new Coding Standards & Banned Patterns section was added to provide explicit rules for contributors and AI agents, plus the reasoning behind them.
- Bans direct
useEffectusage, allowinguseMountEffect()only for rare, justified external side effects - Bans TypeScript
as anycasts, recommending proper typing or narrowing fromunknown - Requires deriving computed state inline (or with
useMemo) instead of syncing state via effects - Requires using
useQuery(or an equivalent data-fetching library) instead of fetching inside effects - Requires handling user actions in event handlers instead of effect-driven “action flag” patterns
- Recommends resetting component state via the
keyprop instead of complex dependency-based reset logic
Discoverability from existing guidance
The existing ANTI-PATTERNS (THIS PROJECT) section now points back to these standards, making the rules easier to find when reviewing project do’s and don’ts.