@jigoooo/shared-ui
Version:
A reusable React component library and design system with TypeScript support, built on Vite for seamless integration and optimized performance.
15 lines (14 loc) • 563 B
TypeScript
import { JSX, RefObject } from 'react';
/**
* useCellCache
*
* @param key - 각 행을 고유하게 식별할 수 있는 키 (예: row.index)
* @param data - 행의 데이터 (불변 객체를 권장)
* @param renderFn - 해당 행을 렌더링하는 함수
* @param externalCacheRef - 외부에서 관리할 cacheRef (옵션)
* @returns 캐싱된 JSX.Element
*/
export declare function useCellCache<T>(key: string, data: T, renderFn: () => JSX.Element, externalCacheRef?: RefObject<Map<string, {
data: T;
element: JSX.Element;
}>>): JSX.Element;