UNPKG

@suspensive/react-query-4

Version:

Suspensive interfaces for @tanstack/react-query@4

1 lines 688 B
{"version":3,"file":"IsFetching.cjs","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,mFAAG,0HAA4B,CAAC,CAAC,EAAI;AACvC"}