chore(types): add tsdocs

This commit is contained in:
moklick
2025-02-11 17:57:21 +01:00
parent 7b0f96f017
commit 381ed2a5bf
34 changed files with 264 additions and 100 deletions
@@ -20,11 +20,10 @@ export type ReactFlowProviderProps = {
};
/**
* The `<ReactFlowProvider />` component is a
*[context provider](https://react.dev/learn/passing-data-deeply-with-context#) that
*makes it possible to access a flow's internal state outside of the
*[`<ReactFlow />`](/api-reference/react-flow) component. Many of the hooks we
*provide rely on this component to work.
* The `<ReactFlowProvider />` component is a [context provider](https://react.dev/learn/passing-data-deeply-with-context#)
* that makes it possible to access a flow's internal state outside of the
* [`<ReactFlow />`](/api-reference/react-flow) component. Many of the hooks we
* provide rely on this component to work.
* @public
*
* @example
@@ -50,9 +49,9 @@ export type ReactFlowProviderProps = {
*```
*
* @remarks If you're using a router and want your flow's state to persist across routes,
*it's vital that you place the `<ReactFlowProvider />` component _outside_ of
*your router. If you have multiple flows on the same page you will need to use a separate
*`<ReactFlowProvider />` for each flow.
* it's vital that you place the `<ReactFlowProvider />` component _outside_ of
* your router. If you have multiple flows on the same page you will need to use a separate
* `<ReactFlowProvider />` for each flow.
*/
export function ReactFlowProvider({
initialNodes: nodes,