feat(hooks): add useReactFlow hook, refactor types and properties

This commit is contained in:
Christopher Möller
2022-01-19 18:31:49 +01:00
parent 1755da3089
commit c2bae79916
27 changed files with 402 additions and 446 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import { useCallback, CSSProperties } from 'react';
import ReactFlow, {
NodeTypesType,
addEdge,
useZoomPanHelper,
useReactFlow,
ReactFlowProvider,
Node,
Connection,
@@ -41,7 +41,7 @@ const UpdateNodeInternalsFlow = () => {
const onConnect = (params: Edge | Connection) => setEdges((els) => addEdge(params, els));
const updateNodeInternals = useUpdateNodeInternals();
const { project } = useZoomPanHelper();
const { project } = useReactFlow();
const onPaneClick = useCallback(
(evt) =>