# AGENTS.md — React (modern) ## Versions - React ≥ 19. React Compiler enabled where the build supports it. - TypeScript 5.x with `strict: true`. ## Conventions - Function components, hooks at the top level, custom hooks prefixed with `use`. - Don't reach for `useMemo` / `useCallback` unless the compiler can't reason about it. - Async data flows through `Suspense` + `use()` whenever practical. - Effects sync side effects to props/state, not state to state. ## Banned - Class components, `componentDidMount`, `forceUpdate`. - Storing derived state. - Mutating props. - Using array indices as React keys for reorderable lists.