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