| [ Web Proxy ] |
| Viewing: https://reactflow.dev/api-reference/utils/is-node | [Back] [Original] |
Test whether an object is usable as a Node. In TypeScript
this is a type guard that will narrow the type of whatever you pass in to
Node if it returns true.
import { isNode } from '@xyflow/react';
const node = {
id: 'node-a',
data: {
label: 'node',
},
position: {
x: 0,
y: 0,
},
};
if (isNode(node)) {
// ..
}| Name | Type | Default |
|---|---|---|
element | unknownThe element to test. |
A project by the xyflow team
info@xyflow.com Copyright 2026 webkid GmbH. All rights reserved website design by Facu Montanaro
| Web Proxy Viewer | New URL | Original Page |