Improve TSDoc comments for useConnection hook

This commit is contained in:
Dimitri POSTOLOV
2025-04-05 17:18:07 +02:00
parent b9e4f82933
commit 0c1436d6a3
2 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
'@xyflow/react': patch
---
Improve TSDoc comments for `useConnection` hook

View File

@@ -30,6 +30,10 @@ function getSelector<NodeType extends Node = Node, SelectorReturn = ConnectionSt
* based on a certain condition (e.g. if the connection is valid or not).
*
* @public
* @param connectionSelector - An optional selector function used to extract a slice of the
* `ConnectionState` data. Using a selector can prevent component re-renders where data you don't
* otherwise care about might change. If a selector is not provided, the entire `ConnectionState`
* object is returned unchanged.
* @example
*
* ```tsx