facebook / react · Issue No. 37602
Component inspection through the DevTools facade returns raw BigInt values in props and hooks. JSON serialization of the advertised serialization-safe result then throws, preventing that result from reaching an inspection/MCP consumer.
Current react/react main: 019019be403c3269e15b8d7ebefb57d30f84086b (React source version 19.3.0). The source includes react-devtools-cdt-mcp 0.1.0; this report is verified against the source baseline.
// Install the facade before initializing React (as documented).
const facade = installFacade();
const tools = createTools(facade);
function Sample({data}) { React.useState(data); return null; }
act(() => root.render(<Sample data={{id: BigInt('9007199254740993')}} />));
const uid = tools.getComponentTree().find(n => n.name === 'Sample').uid;
JSON.stringify(tools.getComponentByUid(uid, true));
// TypeError: Do not know how to serialize a BigInt
A runnable repository regression test is included in the linked fix PR.
normalizeValue returns the BigInt unchanged; JSON.stringify throws for both nested props and hook values.
The normalized result should be serializable while preserving the integer value and its BigInt type distinction.
normalizeValue handles undefined, functions, symbols and objects but falls through for bigint. Both normalizeProps and normalizeHooks use this helper; CDT MCP forwards the result.
Source: packages/react-devtools-facade/src/DevToolsFacadeTreeTools.js.
Severity assessment: Medium. Component inspection through the DevTools facade returns raw BigInt values in props and hooks. JSON serialization of the advertised serialization-safe result then throws, preventing that result from reaching an inspection/MCP consumer.
Before: all 3 new tests fail through the official DevTools build test entry with TypeError: Do not know how to serialize a BigInt. After: DevToolsFacade and DevToolsCdtMcp pass 133/133 tests against locally built experimental NODE_DEV React packages. Prettier, ESLint and Flow pass.
Searched all Issue/PR states for facade serialization, normalizeValue, MCP BigInt and DevTools BigInt. #17207/#17931 concern the older DevTools hydration/copy-to-clipboard path, which already handles bigint separately; they do not fix the newer facade normalizer. No equivalent facade/MCP fix was found.
Only bigint normalization changes. Strings avoid Number precision loss. Other normalized types and the inspected application values remain unchanged. This targets the experimental DevTools facade/CDT MCP integration.
Relay reads this issue against the repository's contribution signals: the files it is likely to touch, how the maintainers triage work this size, and what the first contribution would exercise.
The full analysis for this issue is still being assembled. Until then, the description above and the thread on GitHub are the most reliable context.