facebook/react · error · Error
Argument appears to not be a ReactComponent. Keys: ${keys}
Error message
Argument appears to not be a ReactComponent. Keys: ${keys} What it means
findHostInstance got an object that has neither an internal fiber link nor a render method — it is not a React class component instance at all. React lists the argument's keys in the message to help identify what was actually passed.
Source
Thrown at packages/react-reconciler/src/ReactFiberReconciler.js:167
if (fiber.tag === ClassComponent) {
const Component = fiber.type;
if (isLegacyContextProvider(Component)) {
return processChildContext(fiber, Component, parentContext);
}
}
return parentContext;
}
function findHostInstance(component: Object): PublicInstance | null {
const fiber = getInstance(component);
if (fiber === undefined) {
if (typeof component.render === 'function') {
throw new Error('Unable to find node on an unmounted component.');
} else {
const keys = Object.keys(component).join(',');
throw new Error(
`Argument appears to not be a ReactComponent. Keys: ${keys}`,
);
}
}
const hostFiber = findCurrentHostFiber(fiber);
if (hostFiber === null) {
return null;
}
return getPublicInstance(hostFiber.stateNode);
}
function findHostInstanceWithWarning(
component: Object,
methodName: string,
): PublicInstance | null {
if (__DEV__) {
const fiber = getInstance(component);
if (fiber === undefined) {View on GitHub (pinned to eafeac097b)
Solutions
- If you already hold a DOM node (ref.current), use it directly — no findDOMNode needed
- Pass the mounted class instance obtained via a ref (ref.current is the instance for class children)
- For function components, attach a ref to the host element they render instead of findDOMNode
- Check the argument with a guard (typeof x.render === 'function') before calling in defensive code
Example fix
// before const node = findDOMNode(this.inputRef.current); // inputRef.current is already a DOM node -> throws // after const node = this.inputRef.current; // use the DOM node directly
Defensive patterns
Strategy: type-guard
Type guard
function isReactClassInstance(x: unknown): x is React.Component {
return (
x != null &&
typeof x === 'object' &&
typeof (x as any).render === 'function' &&
typeof (x as any).setState === 'function'
);
} Prevention
- Never pass a DOM node, a component type, or a memo/forwardRef wrapper to findDOMNode
- If ref.current is already a DOM node, use it directly
- For function components, put a ref on the host element they render
- Type shared helpers so only class instances can reach findDOMNode
When it happens
Trigger: ReactDOM.findDOMNode called with a DOM node (e.g. a ref.current you already have), a plain object, a function-component (which has no instance), a memo/forwardRef wrapper object, or a component type instead of a mounted instance.
Common situations: Double resolution: passing ref.current into findDOMNode; passing the component class/function instead of an instance; wrapping findDOMNode around host elements or foreign objects.
Related errors
- Unable to find node on an unmounted component.
- Unable to find node on an unmounted component.
- An unsupported type was passed to use(): ${String(usable)}
- Unknown Fiber. Needs to be a function component to inspect h
- React is running in production mode, but dead code eliminati
AI-assisted analysis of facebook/react@eafeac097b (2026-08-21).
Data as JSON: /api/errors/1d0ead435cde4a44.
Report an issue: GitHub.