โ 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';
Official Primary Reference:
https://react.dev/blog/2024/04/25/react-19-upgrade-guide#useactionstate
๐งช 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.