UNPKG

synapse-react-client

Version:

[![npm version](https://badge.fury.io/js/synapse-react-client.svg)](https://badge.fury.io/js/synapse-react-client) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettie

17 lines 912 B
import { RowSet } from '@sage-bionetworks/synapse-types'; /** * Uses react-query to prefetch data rendered by SynapseTable. Each SynapseTableCell instance load data to render rich * content (e.g. entity data) for the cell based on its column type. This hook uses react-query hooks that will * fetch and de-normalize batch requests, so when the SynapseTableCell component renders, the data is already loaded * in the cache. In practice, this avoids Synapse backend throttling and 'waterfall' content rendering. */ export declare function usePrefetchResourcesInTable(rowSet: RowSet): { dataHasBeenPrefetched: boolean; }; /** * Uses react-query to prefetch an entire page of row data. * * @returns A function that will prefetch the data for a given page number. */ export declare function usePrefetchTableRows(): (pageNumber: number) => Promise<void>; //# sourceMappingURL=usePrefetchTableData.d.ts.map