TanStackT
TanStack9mo ago
6 replies
spotty-amber

Next.js useSuspenseQuery error

I am using Next.js app router.
And use useSuspenseQuery

In the queryFn I called server actiono directly (exported function from "use server"),
but that throws an error saying
Cannot update a component while rendering other component....

And when I change queryFn to fetch function that works just fine.

I just don't know what is happening
Was this page helpful?