@@ -31,8 +31,10 @@ export function Wrapper({
|
||||
const isWrapped = useContext(StoreContext);
|
||||
|
||||
if (isWrapped) {
|
||||
// we need to wrap it with a fragment because it's not allowed for children to be a ReactNode
|
||||
// https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051
|
||||
/*
|
||||
* we need to wrap it with a fragment because it's not allowed for children to be a ReactNode
|
||||
* https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18051
|
||||
*/
|
||||
return <>{children}</>;
|
||||
}
|
||||
|
||||
|
||||
@@ -312,4 +312,24 @@ function ReactFlow<NodeType extends Node = Node, EdgeType extends Edge = Edge>(
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The `<ReactFlow />` component is the heart of your React Flow application.
|
||||
* It renders your nodes and edges and handles user interaction
|
||||
*
|
||||
* @public
|
||||
*
|
||||
* @example
|
||||
* ```tsx
|
||||
*import { ReactFlow } from '@xyflow/react'
|
||||
*
|
||||
*export default function Flow() {
|
||||
* return (<ReactFlow
|
||||
* nodes={...}
|
||||
* edges={...}
|
||||
* onNodesChange={...}
|
||||
* ...
|
||||
* />);
|
||||
*}
|
||||
*```
|
||||
*/
|
||||
export default fixedForwardRef(ReactFlow);
|
||||
|
||||
Reference in New Issue
Block a user