fix(react): use fixedForwardRef function

This commit is contained in:
moklick
2024-03-14 15:08:39 +01:00
parent 0d53fe2f48
commit 54c69c7d8e
4 changed files with 14 additions and 12 deletions
@@ -4,7 +4,6 @@ import {
type TouchEvent as ReactTouchEvent,
type ForwardedRef,
memo,
forwardRef,
} from 'react';
import cc from 'classcat';
import { shallow } from 'zustand/shallow';
@@ -24,6 +23,7 @@ import {
import { useStore, useStoreApi } from '../../hooks/useStore';
import { useNodeId } from '../../contexts/NodeIdContext';
import { type ReactFlowState } from '../../types';
import { fixedForwardRef } from '../../utils';
export interface HandleComponentProps extends HandleProps, Omit<HTMLAttributes<HTMLDivElement>, 'id'> {}
@@ -243,4 +243,4 @@ function HandleComponent(
/**
* The Handle component is a UI element that is used to connect nodes.
*/
export const Handle = memo(forwardRef(HandleComponent));
export const Handle = memo(fixedForwardRef(HandleComponent));