Call api from useServer in nextjs14, apis are not called concurrently #8565
Unanswered
ducyb782001
asked this question in
Q&A
Replies: 2 comments 5 replies
-
server actions run in serial in nextJs. don’t use server actions for making queries. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@TkDodo Omg this might be related to the loading bug I've been having. With React query, are you not able to call server actions directly? Only through a route handler with a fetch? And if not, if you prefetch, what then? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @TkDodo , I'm now working with useServer in nextjs14 for calling external api. When calling from client-side, tanstack query is perfect. But when using use server, this api called is not concurrently. Each API is called sequentially, one is finished then the next. I don't know why and how to resolve it.
Here is my stackblizt: https://stackblitz.com/edit/stackblitz-starters-s5vflexj?file=app%2Fpage.tsx
Can anyone help me with this
Beta Was this translation helpful? Give feedback.
All reactions