---
title: "Discussion on \"Cache your fetcher in useSWR with useCallback.\" | Hashnode"
description: "Discussion on \"Cache your fetcher in useSWR with useCallback.\". I found a way that caches the fetcher in useSWR using useCallback in the Gitroom source code.\n\nThe above image is from platform-analytics/render.analytics.tsx. Let’s try to understand this code snippet.\nwe’ll explore how to optimize data fetching in ..."
url: "https://hashnode.com/posts/cache-your-fetcher-in-useswr-with-usecallback/66a9566f487674965ffd98e5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Cache your fetcher in useSWR with useCallback.](https://ramunarasinga.hashnode.dev/cache-your-fetcher-in-useswr-with-usecallback?utm_source=hashnode&utm_medium=feed)

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 ...

Jul 28, 2024 · 3 min read · ramunarasinga.hashnode.dev  
Read the article

-   [#cache](https://hashnode.com/tag/cache)
-   [#useswr](https://hashnode.com/tag/useswr)
-   [#usecallback](https://hashnode.com/tag/usecallback)
-   [#nextjs](https://hashnode.com/tag/nextjs)

## Written by

[Ramu Narasinga](https://hashnode.com/@ram11)

@ram11

  
[View profile](https://hashnode.com/@ram11)

I am a FOSS enthusiast who explores patterns in the Github wilderness.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
