How to get data from server action
So I'm trying to get data back from a server action, like you would in Remix with
useActionData
and I just don't know how to access it.
As an example:
2 Replies
You can do
More info: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#props
Or: https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions#experimental-useoptimistic (just ignore the optimistic stuff)
Data Fetching: Server Actions
Use Server Actions to mutate data in your Next.js application.
sweet, thanks!