Cache your fetcher in useSWR with useCallback.
I found a way that caches the fetcher in useSWR using useCallback in the Gitroom source code.
The above image is from platform-analytics/render.analytics.tsx. Let’s try to understand this code snippet.
we’ll explore how to optimize data fetching in ...
ramunarasinga.hashnode.dev3 min read