shane
TTCTheo's Typesafe Cult
•Created by Cookies on 2/13/2024 in #questions
Understanding When To Use Server Actions
- server components: React components that are rendered only on the server (not included in client bundle). they can be async and fetch data, etc.
- server actions: functions executed on the server that can be called by server and client components.
10 replies
TTCTheo's Typesafe Cult
•Created by Cookies on 2/13/2024 in #questions
Understanding When To Use Server Actions
10 replies
TTCTheo's Typesafe Cult
•Created by Cookies on 2/13/2024 in #questions
Understanding When To Use Server Actions
I tried using a server action to pull data for a dashboardserver actions are meant for mutations (internally they use the
POST
method).
do your data fetching in your (server) components.10 replies