--- name: react-router-code-review description: Reviews React Router v7 (and v6.4+ Data Router) code for proper data loading, mutations, error handling, and navigation patterns. Use when reviewing React Router routes, loaders, actions, error boundaries, or navigation logic. --- # React Router Code Review ## Quick Reference | Issue Type | Reference | |------------|-----------| | useEffect for data, missing loaders, streaming, params | [references/data-loading.md](references/data-loading.md) | | Form vs useFetcher, action patterns, `data()` status | [references/mutations.md](references/mutations.md) | | Missing error boundaries, `ErrorBoundary` / `errorElement` | [references/error-handling.md](references/error-handling.md) | | navigate() vs Link, pending states | [references/navigation.md](references/navigation.md) | ## Review Checklist - [ ] Data loaded via `loader` (or `clientLoader` in Framework Mode) not `useEffect` - [ ] Route params accessed type-safely with validation - [ ] Parallelizing independent fetches with `Promise.all`, and streaming non-critical promises directly (v7) or via `defer()` (v6.4+ legacy) - [ ] Mutations use `