Reviews React Router code for proper data loading, mutations, error handling, and navigation patterns. Use when reviewing React Router v6.4+ code, loaders, actions, or navigation logic.
| Issue Type | Reference |
|---|---|
| useEffect for data, missing loaders, params | references/data-loading.md |
| Form vs useFetcher, action patterns | references/mutations.md |
| Missing error boundaries, errorElement | references/error-handling.md |
| navigate() vs Link, pending states | references/navigation.md |
loader not useEffectdefer() for parallel data fetching when appropriate<Form> or useFetcher not manual fetcherrorElement on routesisRouteErrorResponse() to check error types<Link> over navigate() where possibleuseNavigation() or fetcher.stateThese patterns are correct React Router usage - do not report as issues:
useLoaderData<typeof loader>() is a type annotation, not a type assertionOnly flag these issues when the specific context applies:
| Issue | Flag ONLY IF |
|---|---|
| Missing loader | Data is available server-side (not client-only) |
| useEffect for data fetching | Data is NOT client-only (localStorage, browser APIs, window size) |
| Missing errorElement | No parent route in the hierarchy has an error boundary |
| navigate() instead of Link | Navigation is NOT triggered by an event handler or conditional logic |
Load and follow review-verification-protocol before reporting any issue.