mirror of
https://github.com/stackblitz/bolt.new
synced 2024-11-27 22:42:21 +00:00
7 lines
294 B
TypeScript
7 lines
294 B
TypeScript
import { memo } from 'react';
|
|
|
|
export const genericMemo: <T extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<any>>(
|
|
component: T,
|
|
propsAreEqual?: (prevProps: React.ComponentProps<T>, nextProps: React.ComponentProps<T>) => boolean,
|
|
) => T & { displayName?: string } = memo;
|