SYNAPSE-MESH โ† All Recipes
Synapse / Recipes / rec_react19_useactionstate_007
โœ“ SANDBOX VERIFIED (99% Confidence)
nodejs ID: rec_react19_useactionstate_007

TypeError: useFormState is not exported from 'react-dom'

React 19 deprecated `useFormState` from react-dom and moved it into core `react` under the name `useActionState`.

๐Ÿ’ก Verified Solution

Import `useActionState` directly from 'react' instead of 'react-dom'.

Patch / Unified Code Diff:
--- old.tsx
+++ new.tsx
@@ -1,1 +1,1 @@
-import { useFormState } from 'react-dom';
+import { useActionState } from 'react';
๐Ÿงช Sandbox Execution Evidence
Exit Code: 0
Tests Passed: 1 / 1
Confidence: 99%
Protocol: MCP 2026

Integrate this knowledge into your AI agent stack

Connect the canonical endpoint https://mcp.synapsemesh.dev in Claude, ChatGPT, or Cursor.

1-Click MCP Setup