diff --git a/examples/react/src/examples/MultiSetNodes/index.tsx b/examples/react/src/examples/MultiSetNodes/index.tsx
new file mode 100644
index 00000000..f05c2b50
--- /dev/null
+++ b/examples/react/src/examples/MultiSetNodes/index.tsx
@@ -0,0 +1,87 @@
+import { useCallback } from 'react';
+import {
+ ReactFlow,
+ Controls,
+ addEdge,
+ Connection,
+ useNodesState,
+ useEdgesState,
+ Background,
+ Node,
+ Edge,
+ Panel,
+ useReactFlow,
+ ReactFlowProvider,
+} from '@xyflow/react';
+
+const initNodes: Node[] = [
+ {
+ id: '1',
+ data: {
+ label: 'hallo',
+ },
+ position: { x: 0, y: 0 },
+ },
+ {
+ id: '2',
+ data: {
+ label: 'world',
+ },
+ position: { x: 200, y: 0 },
+ },
+];
+
+const initEdges: Edge[] = [];
+
+const CustomNodeFlow = () => {
+ const { setNodes } = useReactFlow();
+ const [nodes, , onNodesChange] = useNodesState(initNodes);
+ const [edges, setEdges, onEdgesChange] = useEdgesState(initEdges);
+
+ const onConnect = useCallback((connection: Connection) => setEdges((eds) => addEdge(connection, eds)), [setEdges]);
+
+ const updateNodes = () => {
+ setNodes((nds) =>
+ nds.map((n) => {
+ if (n.id === '1') {
+ return { ...n, data: { label: 'updated' } };
+ }
+
+ return n;
+ })
+ );
+
+ setNodes((nds) =>
+ nds.map((n) => {
+ if (n.id === '2') {
+ return { ...n, data: { label: 'updated' } };
+ }
+
+ return n;
+ })
+ );
+ };
+
+ return (
+
+
+
+
+
+
+
+ );
+};
+
+export default () => (
+
+
+
+);