<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g" -->

---
title: Understanding useMemo and useCallback | daily.dev
description: The main thing that React does is keep our UI in sync with our application state. The tool that it uses to do this is called a “re-render” Each re-render is a...
canonical: https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Understanding useMemo and useCallback | daily.dev
og:description: The main thing that React does is keep our UI in sync with our application state. The tool that it uses to do this is called a “re-render” Each re-render is a...
og:url: https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g
og:image: https://api.daily.dev/og/posts/PTQrzzJ8g.png
og:image:alt: Understanding useMemo and useCallback
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Understanding useMemo and useCallback

**[Josh W Comeau](https://daily.dev/sources/joshwcomeau)** · 18 min read · 280 upvotes · 12 comments

## Summary

The main thing that React does is keep our UI in sync with our application state. The tool that it uses to do this is called a “re-render” Each re-render is a snapshot of what the application's UI should look like at a given moment in time. For example, let's suppose our example also features a digital clock. We could potentially run into some performance problems if we wind up doing this work gratuitously.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.joshwcomeau.com/react/usememo-and-usecallback/>

## Community discussion

Top comments from developers on daily.dev.

**@exploit** · 3 upvotes

> This is amazing, Thank you @joshwcomeau !

**@raqibnur** · 1 upvotes

> Good Explanation

**@crevulus** · 1 upvotes

> This guy is always fantastic. His react re-rendering guide works really well with this article: https://www.joshwcomeau.com/react/why-react-re-renders/

**@ferdianqbl** · 1 upvotes

> Nice info 👍

**@subashbasnet** · 1 upvotes

> Nice article. Great article here as well:
> https://scanskill.com/frontend/react/usememo-and-usecallback-in-react-hooks/

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#react](https://daily.dev/tags/react), [#react-hooks](https://daily.dev/tags/react-hooks)

[View this post on daily.dev](https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Understanding useMemo and useCallback","url":"https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g"},"datePublished":"2022-08-30T16:20:59.297Z","dateModified":"2022-08-30T16:20:59.224Z","description":"The main thing that React does is keep our UI in sync with our application state. The tool that it uses to do this is called a “re-render” Each re-render is a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f07e5270af005aa0311dd7c80f4ed2cb","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f07e5270af005aa0311dd7c80f4ed2cb","isAccessibleForFree":true,"articleSection":"Josh W Comeau","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Josh W Comeau","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/4a121572d03c40a2bff9e8ed0f0792b5","url":"https://daily.dev/sources/joshwcomeau"},"commentCount":12,"discussionUrl":"https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":280},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":12}],"keywords":"react,react-hooks","timeRequired":"PT18M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Josh W Comeau","item":"https://daily.dev/sources/joshwcomeau"},{"@type":"ListItem","position":3,"name":"Understanding useMemo and useCallback"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/understanding-usememo-and-usecallback-ptqrzzj8g","comment":[{"@type":"Comment","text":"This is amazing, Thank you @joshwcomeau !","datePublished":"2022-08-30T17:24:36.587Z","dateModified":"2022-08-30T17:29:08.262Z","url":"https://daily.dev/posts/PTQrzzJ8g#c-xbA-wtXGi","author":{"@type":"Person","name":"Jason Southin","url":"https://daily.dev/exploit","image":"https://avatars.githubusercontent.com/u/36006905?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3}},{"@type":"Comment","text":"Good Explanation","datePublished":"2022-08-31T03:23:55.143Z","url":"https://daily.dev/posts/PTQrzzJ8g#c-bZRaYTIPF","author":{"@type":"Person","name":"raqib nur","url":"https://daily.dev/raqibnur","image":"https://media.daily.dev/image/upload/s--seLSoAVy--/f_auto/v1736312346/avatars/avatar_r-mKekZy5"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"This guy is always fantastic. His react re-rendering guide works really well with this article: https://www.joshwcomeau.com/react/why-react-re-renders/","datePublished":"2022-08-31T09:27:45.157Z","url":"https://daily.dev/posts/PTQrzzJ8g#c-Fq0B4YaX5","author":{"@type":"Person","name":"Christopher Evans","url":"https://daily.dev/crevulus","image":"https://avatars.githubusercontent.com/u/50107046?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Nice info 👍","datePublished":"2022-09-01T11:44:02.624Z","url":"https://daily.dev/posts/PTQrzzJ8g#c-LQv80uWXx","author":{"@type":"Person","name":"Muhammad Ferdian Iqbal","url":"https://daily.dev/ferdianqbl","image":"https://avatars.githubusercontent.com/u/56886904?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Nice article. Great article here as well:\nhttps://scanskill.com/frontend/react/usememo-and-usecallback-in-react-hooks/","datePublished":"2022-09-06T03:36:46.723Z","url":"https://daily.dev/posts/PTQrzzJ8g#c-1dg4YULmo","author":{"@type":"Person","name":"CurlyBracket","url":"https://daily.dev/subashbasnet","image":"https://lh3.googleusercontent.com/a/AItbvmkAd0bff1HGI2tRPqJs7_a1ceIxaytyI3Wp9v2n=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

