Merge pull request #5167 from dimaMachina/tsdoc2-13
Improve TSDoc comments for `useEdges`, `useInternalNode`, `useNodes` and `useNodeId` hooks
This commit is contained in:
5
.changeset/gorgeous-hats-count.md
Normal file
5
.changeset/gorgeous-hats-count.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@xyflow/react': patch
|
||||
---
|
||||
|
||||
Improve TSDoc comments for `useEdges`, `useInternalNode`, `useNodes` and `useNodeId` hooks
|
||||
@@ -10,7 +10,7 @@ export const Consumer = NodeIdContext.Consumer;
|
||||
* drill down the id as a prop.
|
||||
*
|
||||
* @public
|
||||
* @returns id of the node
|
||||
* @returns The id for a node in the flow.
|
||||
*
|
||||
* @example
|
||||
*```jsx
|
||||
|
||||
@@ -10,7 +10,7 @@ const edgesSelector = (state: ReactFlowState) => state.edges;
|
||||
* will re-render **whenever any edge changes**.
|
||||
*
|
||||
* @public
|
||||
* @returns An array of edges
|
||||
* @returns An array of all edges currently in the flow.
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
|
||||
@@ -10,8 +10,8 @@ import type { InternalNode, Node } from '../types';
|
||||
* including when a node is selected or moved.
|
||||
*
|
||||
* @public
|
||||
* @param id - id of the node
|
||||
* @returns array with visible node ids
|
||||
* @param id - The ID of a node you want to observe.
|
||||
* @returns The `InternalNode` object for the node with the given ID.
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
|
||||
@@ -11,7 +11,7 @@ const nodesSelector = (state: ReactFlowState) => state.nodes;
|
||||
* or moved.
|
||||
*
|
||||
* @public
|
||||
* @returns An array of nodes
|
||||
* @returns An array of all nodes currently in the flow.
|
||||
*
|
||||
* @example
|
||||
* ```jsx
|
||||
|
||||
Reference in New Issue
Block a user