Replies: 1 comment
-
SWR will always be useful as long as React continues to do a poor job at supporting async calls. The same thing applies to react-query. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does Vercel / Next.js still recommend using SWR for data fetching needs, even with Next 15+React 19?
I have been using Server Actions for initial data but the re-fetches have been non-trivial on how to go about.
For instance, after someone adds something to a collection that was initially fetched and passed down to the client component, I have to decide on where and how to re-fetch the data. Sometimes I use a swr hook, but others, I use useState and either call an API or call a server action from a client component, and update the state.
And that's the issue: there isn't a clear path on best practices, or even how SWR fits in the new architecture with Server Actions + app router.
Is SWR still being supported? Recommended?
I think a discussion should be opened and we should talk about it.
Beta Was this translation helpful? Give feedback.
All reactions