Skip to content
Source
Sign inSign up
TanStack/db

Support suspense in React #692

Send to my agent
ClosedMAST1999(GitHub profile, opens in a new tab) opened this issue 0 comments

Current Situation Right now, there is no way to handle the data loading aspect of useLiveQuery with Suspense in React or any other integrations as far as I could tell.

Expected behavior We should be able to opt into suspense or have a new hook called useLiveSuspenseQuery like tanstack/query.

Additional context This was requested in this discord chat, and I've also encountered the need to do this.

Implementation I've done a rough implementation on top of the current useLiveQuery here which I don't think is ideal, but I've hit a blocker.

The use(collection.preload()) promise is never resolving, or it's not correctly notified. I can't figure it out right now.

Sign in to join this conversation.