@suspensive/react-query-4
Version:
Suspensive interfaces for @tanstack/react-query@4
1 lines • 692 B
Source Map (JSON)
{"version":3,"file":"IsFetching.mjs","names":[],"sources":["../src/IsFetching.tsx"],"sourcesContent":["'use client'\nimport { type QueryFilters, useIsFetching } from '@tanstack/react-query'\nimport type { ReactNode } from 'react'\n\n/**\n * Renders the current fetching count for queries that match the given filters.\n * @experimental This is an experimental feature.\n */\nexport const IsFetching = ({\n children,\n ...filter\n}: QueryFilters & { children: (isFetching: ReturnType<typeof useIsFetching>) => ReactNode }) => (\n <>{children(useIsFetching(filter))}</>\n)\n"],"mappings":";;;;;;;mBASE;;;;;AADF,MAAa,cAAc,SAGqE;KAHrE,EACzB;CAE8F,OAC9F,0CAAG,SAAS,sDAAmB,CAAC,CAAC,EAAI;AACvC"}