mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
8 lines
271 B
TypeScript
8 lines
271 B
TypeScript
import type { ComponentProps, ComponentType } from 'react';
|
|
import { memo } from 'react';
|
|
|
|
export const genericMemo: <T extends ComponentType<any>>(
|
|
Component: T,
|
|
propsAreEqual?: (prevProps: ComponentProps<T>, nextProps: ComponentProps<T>) => boolean,
|
|
) => T = memo;
|