Is it bad practice to use server actions for GET requests?
Unanswered
Atlantic herring posted this in #help-forum
Atlantic herringOP
Hey quick question, is it bad practice to use server actions for GET requests?
8 Replies
@Atlantic herring Hey quick question, is it bad practice to use server actions for GET requests?
Whiteleg shrimp
Server actions are always post requests and they always run sequentially even when using Promise.all
So yes, it will be a bad practice
I'm hoping that some day we will get server actions for data fetching
@Whiteleg shrimp Server actions are always post requests and they always run sequentially even when using Promise.all
Atlantic herringOP
Alright, that’s what I figured
@Whiteleg shrimp I'm hoping that some day we will get server actions for data fetching
Atlantic herringOP
What is the preferred approach for data fetching?
Whiteleg shrimp
I currently have an API built with Hono and fetched by react query
But the recommended and simpler method is using server components
@Atlantic herring What is the preferred approach for data fetching?
Whiteleg shrimp
https://nextjs.org/docs/app/getting-started/fetching-data#with-the-fetch-api something like this