Guidelines for reviewing React pull requests focusing on the React Compiler, 'use' hook, and Action hooks.
To ensure React pull requests utilize modern (v19+) best practices, including the React Compiler and native form handling, to minimize manual optimization and state management.
Input: pr_context
Output: initial_notes
Gate: none
On error: abort
Input: component_code
Output: optimization_findings
Gate: none
On error: continue
useMemo or useCallback. These should generally be removed as the compiler handles them automatically now.Input: hook_usage
Output: data_flow_findings
Gate: none
On error: continue
use() hook is used for promises and context instead of complex useEffect or useContext patterns.Input: form_code
Output: form_findings
Gate: none
On error: continue
useActionState and useFormStatus to handle form logic and loading states natively.Input: prop_types, types
Output: design_findings
Gate: none
On error: continue
useEffect.Input: component_markup
Output: a11y_findings
Gate: none
On error: continue
Input: tests, all_findings
Output: review_report
Gate: none
On error: abort