Skip to content

Commit bb8fc95

Browse files
committed
chore(changeset): add
1 parent 68ba907 commit bb8fc95

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.changeset/selfish-doors-buy.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
"@vue-flow/core": minor
3+
---
4+
5+
Add node id and node type to return of `useNodesData`.
6+
7+
⚠️This is a small breaking change from the previous implementation!
8+
9+
Previously you would only receive the data object back, now you will receive an object with the data and the node id and type.
10+
11+
```ts
12+
const nodesData = useNodesData(nodeIds);
13+
14+
// Previously
15+
nodesData.forEach((data) => {
16+
// ...
17+
});
18+
19+
// Now
20+
nodesData.forEach(({ id, type, data }) => {
21+
// ...
22+
});
23+
```

0 commit comments

Comments
 (0)