@samitouri / QOS-React-1 / commits / 93882bd40e

[errors] s/form state/action state (#35790)

Noticed `useActionState` error still refers to "form state" while writing the docs.

Ricky committed Mar 4, 2026 at 14:20 UTC 93882bd40ee48dc6d072dfc0b6cc7801fac1be31
3 files changed +3 -3
packages/react-dom/src/__tests__/ReactDOMForm-test.js
+1 -1
@@ -1092,7 +1092,7 @@ describe('ReactDOMForm', () => {
1092 const root = ReactDOMClient.createRoot(container);
1093 await act(async () => {
1094 root.render(<App />);
1095 - await waitForThrow('Cannot update form state while rendering.');
1095 + await waitForThrow('Cannot update action state while rendering.');
1096 });
1097 });
1098
packages/react-reconciler/src/ReactFiberHooks.js
+1 -1
@@ -2085,7 +2085,7 @@ function dispatchActionState<S, P>(
2085 payload: P,
2086 ): void {
2087 if (isRenderPhaseUpdate(fiber)) {
2088 - throw new Error('Cannot update form state while rendering.');
2088 + throw new Error('Cannot update action state while rendering.');
2089 }
2090
2091 const currentAction = actionQueue.action;
scripts/error-codes/codes.json
+1 -1
@@ -470,7 +470,7 @@
470 "482": "An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
471 "483": "Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",
472 "484": "A Server Component was postponed. The reason is omitted in production builds to avoid leaking sensitive details.",
473 - "485": "Cannot update form state while rendering.",
473 + "485": "Cannot update action state while rendering.",
474 "486": "It should not be possible to postpone at the root. This is a bug in React.",
475 "487": "We should not have any resumable nodes in the shell. This is a bug in React.",
476 "488": "Couldn't find all resumable slots by key/index during replaying. The tree doesn't match so React will fallback to client rendering.",