@joint/react
Version:
React bindings and hooks for JointJS to build interactive diagrams and graphs.
14 lines (13 loc) • 590 B
TypeScript
import type { ComponentType, ComponentProps } from 'react';
/**
* Sugar around React.memo to avoid the need to specify the type of the component.
* @group utils
*/
declare const typedMemo: <Component extends ComponentType<any>>(function_: Component, propsAreEqual?: (previousProps: Readonly<ComponentProps<Component>>, nextProps: Readonly<ComponentProps<Component>>) => boolean) => Component;
/**
* Sugar around React.memo to avoid the need to specify the type of the component.
* @param function_ - The component to memoize.
* @group Utils
* @internal
*/
export default typedMemo;