MCPcopy Create free account
hub / github.com/TanStack/db / SuspenseCounter

Function SuspenseCounter

packages/react-db/tests/useLiveSuspenseQuery.test.tsx:417–432  ·  view source on GitHub ↗
({ children }: { children: ReactNode })

Source from the content-addressed store, hash-verified

415
416 let suspenseCount = 0
417 const SuspenseCounter = ({ children }: { children: ReactNode }) => {
418 return (
419 <Suspense
420 fallback={
421 <div>
422 {(() => {
423 suspenseCount++
424 return `Loading...`
425 })()}
426 </div>
427 }
428 >
429 {children}
430 </Suspense>
431 )
432 }
433
434 const { result } = renderHook(
435 () => useLiveSuspenseQuery((q) => q.from({ persons: collection })),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected