T
TanStack3y ago
fascinating-indigo

Suspense + Transitions not working as expected

hi, i'm trying to use a createQuery together with solidjs "async transitions" feature. Transitions + suspense boundry should allow the updating of the resource's dependency to be done together with the updating of the actual data. That way the resource does not fall back to the loading state and instead only shows the new data and completes the update once the resource is done. Example with both a native solid-js resource and a tanstack/solid-query createQuery: https://stackblitz.com/edit/solid-vite-ehmk1f?file=src%2Findex.tsx With solid-query this does not seem to be work correctly and the data immediately updates and the suspense falls back to loading state. With keepPreviousData=true (commented out) keeping of the data is possible but the fetching itself is not in actually happening in a "transition" as evident by the count immediately updating vs updating with the query. Is it possible to replicate use the transitions? I thought perhabs the "suspense" query option would do that but no cigar and tbh i'm not exactly sure what it does in the solid version? EDIT: edited for clarity
KamehamehaNudel
StackBlitz
Solid Counter TS (forked) - StackBlitz
Starter project for Node.js
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?