Does useSWR always refetch (revalidate) the data? If so it cannot replace Redux? #827
-
I wanted to use SWR instead of Redux but I see one issue there. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Actually it can be closed. |
Beta Was this translation helpful? Give feedback.
-
Why? SWR keeps the data refresh, and it will notify your UI. That's nothing to do with Redux (you can keep your data refresh with Redux too). If what you mean is local data mutation, check https://swr.vercel.app/docs/mutation. |
Beta Was this translation helpful? Give feedback.
Why? SWR keeps the data refresh, and it will notify your UI. That's nothing to do with Redux (you can keep your data refresh with Redux too). If what you mean is local data mutation, check https://swr.vercel.app/docs/mutation.