TanStack

T

TanStack

TanStack is a community of passionate software engineers striving for high-quality, open-source software for web devs

Join

react-query-questions

solid-query-questions

table-questions

virtual-questions

router-questions

react-charts-questions

ranger-questions

vue-query-questions

svelte-query-questions

bling-questions

form-questions

angular-query-questions

start-questions

db-questions

start-showcase

router-showcase

📣-announcements

rare-sapphire
rare-sapphire11/16/2025

useSuspenseQuery

since solid-query does not have a useSuspenseQuery hook, is there a way to configure a query via its options so it acts like useSuspenseQuery? where i dont worry about no loading states, errors. query data is typed as T and not as T | undefined
environmental-rose
environmental-rose10/31/2025

How do I fetch data while blocking SSR to prevent loading states? await suspense?

In other frameworks, like Nuxt, I can do something like: ``` const { suspense } = someQueryHere(); await suspense();...
stormy-gold
stormy-gold8/3/2025

Make queries reactive

When passing a query object to a component like this: ```ts const dataQuery = useQuery(() => ({...
genetic-orange
genetic-orange4/28/2025

SolidQueryDevtools doesn't render in a TansStack Start app

When I try to add the dev tools to a Start project using Solid, I just get a [object Promise] Example: https://codesandbox.io/p/devbox/amazing-varahamihira-n3n952...
passive-yellow
passive-yellow4/21/2025

Solidstart + TanStack/query error prefetch

Hello, I'm writing here because I have a problem with TanstackQuery. I tried to implement it in my Solidstart project. But I get this error every time:
 (index):347 Uncaught (in promise) Error: experimental_prefetchInRender feature flag is not enabled
 (index):347 Uncaught (in promise) Error: experimental_prefetchInRender feature flag is not enabled
Here is an example of my implementation : ``` export default function Home() {...
exotic-emerald
exotic-emerald4/1/2025

Solid.js + tanstack/solid-query multiple refetch problem on error

Hi all, I'm using tanstack for client-server communication. And I'm turning the hook to createMemo if I want it to be re-mounted when I change query-params. But, for some reason, if such a hook receives an error from the server, it mounts infinitely many times. How to solve this problem?
const eventsQuery = createMemo(() => messagesIds().length ? getScheduledEventsApiFrontendScheduledEventsGetQuery(...
No description
eager-peach
eager-peach3/24/2025

How to use QueryClient within Actions

It's my first time using Solid Query in a Solid app and have questions about what the proper usage of it is within action functions that come from Solid. Given the following: ```ts type SignInForm = {...
genetic-orange
genetic-orange11/2/2024

TanstackQuery useMutation example

Hey folks, would like your takes/assistance on a silly one. I'm using TSQ for a small SolidJS project and I'm trying to create a mutation but it seems like the newer version does not support the previous version in which we passed a mutationFn and a mutationKey . This is the way I usually go about it. I've got the follow function to create a thing: ``` const createThing = async (thing: object) => { try {...
genetic-orange
genetic-orange10/24/2024

Error: experimental_prefetchInRender feature flag is not enabled

I started getting this error in Solid Query in code that worked fine before. Has there been a breaking change?
No description
extended-salmon
extended-salmon5/21/2024

Invalidate during an action()

If you have an action attached to a form, and you call invalidate and await that, the rest of the action never runs.
``` const myAction = action(async ()=>{ /// do something await queryClient.invalidateQueries();...
extended-salmon
extended-salmon5/21/2024

TypeScript errors for createQuery(options, queryClient)

If I do the following: ``` const tsqSessionQueryOptions = () => { return queryOptions({...
genetic-orange
genetic-orange5/14/2024

Suspend with query data from external promise

I'd like to do something like the following repro: - Create a query in a component - Fetch query data in some promise outside of the createQuery - Use that promise as the next result for the createQuery - Cause the createQuery to re-suspend while waiting for the promise to resolve...
absent-sapphire
absent-sapphire3/29/2024

accessing the queries status triggers <Suspense>?

Hi, Using the latest solid-query and got a question regarding its interaction with suspense: Stackblitz repro: https://stackblitz.com/edit/solid-vite-6v3qxx?file=src%2Findex.tsx...
genetic-orange
genetic-orange3/20/2024

Bug during hydratation - wrong queryKey is hydrated

I use Solid Query to load a list of items. The list is paginated. Page number is part of the queryKey. If the user clicks on the "Next page" button before hydratation has completed, the user sees the title "Page 2" but is displayed items that belong to page 1. On window refocus, items for page 2 are fetched and displayed correctly. In Solid Query dev tools, I can see:...
useful-bronze
useful-bronze3/13/2024

Suspense sometimes not resolving

Hi there, I've got a bit of a strange issue which I believe is a bug in solid-query. I've got a reproduction here https://stackblitz.com/edit/solidjs-templates-al24pp?file=src%2FApp.tsx When typing into the input slowly everything works correctly, however spamming keys quickly can sometimes cause it to get stuck in a loading state. I believe it might be a race condition somewhere, as my demo doesn't actually reproduce it quite as reliably as the app I extracted it from....
genetic-orange
genetic-orange2/8/2024

Optimistic updates without re-rendering everything?

Hi, I have a shopping cart. When a user changes the quantity of some item, I'd like to do an optimistic update along with the mutation. If I call:
queryClient.setQueryData(['cart'], /* shopping cart where relevant item is modified */);
queryClient.setQueryData(['cart'], /* shopping cart where relevant item is modified */);
...
fascinating-indigo
fascinating-indigo1/10/2024

Query dependencies

Is there any way to mark one query as dependency of another query? literally, I need to pass part of the data from one query into another one. I don't think enabled: would work for me, as I need to hold suspense and resolve all of these queries during SSR phase. I could probably combine them in the same async+query, but that means I can't reuse first query without the second one...
sensitive-blue
sensitive-blue11/11/2023

Ability to disable suspense for certain queries

I only want <Suspense> to only be triggered on certain queries, is there no way to do this? The suspense property in query options seems to be ignored and from what I can tell in the source code, nothing actually reads that property.
flat-fuchsia
flat-fuchsia8/22/2023

Same update for multiple queries

My app has a general feed with posts of all the subcommnuties under the queryKey ['posts', communityId]. But you can go directly to one community and scroll over the posts of that community (queryKey: ['posts', communityId, subCommunityId]) And if you enter to see post details you have the queryKey ['post', 'communityId, postId] My problem is that every mutation hook that dispatch an action like 'comment', 'upvote', etc ends in three setQueryData that the search in the list of posts to update the correct post....
dependent-tan
dependent-tan8/7/2023

Multiple calls in createInfiniteQuery

this question is not strictly related to the solidjs version, it would be the same with useInfiniteQuery, is there a way in the queryFn to call two api endpoint instead of just one? I need to aggregate some data from two different call ``` queryFn: ({ pageParam = 1 }) => fetchPage(pageParam),...
Next