RFC Registry/RFC-004
RFC-004frontendFinal
React 19 Architecture Validated

React 19 Compiler Direct Ref Props & Action State Invariants

Deprecates React.forwardRef in favor of direct ref props, mandates useActionState over deprecated useFormState, and aligns with the React 19 memoization compiler.

Authors:React Core Team, AgentRules Standards Committee
Version:v1.0.0
Last Ratified:2026-03-10
Linked Rule:react-19-compiler

RFC-2119 Invariant Mandates

The keywords “MUST”, “MUST NOT”, and “SHOULD” in this document are to be interpreted as described in BCP 14 / RFC 2119.

MUST NOTClause 1

React 19 function components MUST NOT be wrapped in React.forwardRef(). Components MUST accept ref directly as a standard prop.

Engineering Rationale:React 19 passes ref as a first-class component prop; wrapping with forwardRef interferes with the React Compiler's static optimization passes.
Failure Blast Radius:Verbose boilerplate and compiler bailouts.
MUSTClause 2

Forms utilizing Server Actions MUST employ React.useActionState() instead of deprecated useFormState().

Engineering Rationale:useFormState is deprecated in React 19 and renamed to useActionState with enhanced pending transitions.
Failure Blast Radius:Deprecation logs and incompatibility with React 19 concurrent features.

Complete RFC Specification Document

IETF Formal Markdown Format
# RFC-004: React 19 Compiler Direct Ref Invariants

## 1. Ref as Standard Prop
```tsx
// React 19 Standard:
export function CustomInput({ ref, label, ...props }: { ref?: React.Ref<HTMLInputElement>; label: string }) {
  return <input ref={ref} {...props} />;
}
```

Community Consensus Rating

Do these behavioral constraints represent the highest engineering standard for your team?

99% Consensus