Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: clarify data fetching pattern #59602

Merged
merged 1 commit into from
Dec 20, 2023
Merged

docs: clarify data fetching pattern #59602

merged 1 commit into from
Dec 20, 2023

Conversation

leerob
Copy link
Member

@leerob leerob commented Dec 14, 2023

You don't fetch data with Server Actions, but mutate.

@leerob leerob requested review from a team as code owners December 14, 2023 02:15
@leerob leerob requested review from manovotny and lydiahallie and removed request for a team December 14, 2023 02:15
@leerob leerob merged commit 29fcd57 into canary Dec 20, 2023
31 checks passed
@leerob leerob deleted the leerob-patch-1 branch December 20, 2023 02:24
@Bruce9000
Copy link

Hi @leerob I use Server Actions for data fetching pretty liberally - this commit looks like I should not be doing this anymore if it's no longer a recommended pattern.

Should I be looking to migrate my code away from data fetching via Server Actions to future proof my code?

@leerob
Copy link
Member Author

leerob commented Dec 21, 2023

Could you share an example of what you're doing?

@Bruce9000
Copy link

Sure! I’m working on a sizeable commercial app powered by NextJS, I can’t share the actual code it’s all internal, but I’ve put together a quick approximation of the sort of code we’re doing to fetch data from Server Actions:

https://github.com/Bruce9000/server-action-data-fetching

Just concerned when I saw your commit, that maybe we are misusing Server Actions if we keep using them for data fetching, and may start to encounter more issues if it’s not recommended practice.

Thanks in advance for your time!

@github-actions github-actions bot added the locked label Jan 4, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants