From af87e4ef14b6409ff65ecb1a2e4f0dfc1bfe16f9 Mon Sep 17 00:00:00 2001 From: Caio Bittencourt Date: Wed, 13 May 2026 15:42:25 -0300 Subject: [PATCH] fix(curriculum): clarify useMemo rerender behavior (#67350) Signed-off-by: Caio Bittencourt Co-authored-by: majestic-owl448 <26656284+majestic-owl448@users.noreply.github.com> --- .../67d2f4ddb4a4306fdf5bbaee.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/curriculum/challenges/english/blocks/lecture-working-with-data-fetching-and-memoization-in-react/67d2f4ddb4a4306fdf5bbaee.md b/curriculum/challenges/english/blocks/lecture-working-with-data-fetching-and-memoization-in-react/67d2f4ddb4a4306fdf5bbaee.md index e100375fedf..83bd62286a6 100644 --- a/curriculum/challenges/english/blocks/lecture-working-with-data-fetching-and-memoization-in-react/67d2f4ddb4a4306fdf5bbaee.md +++ b/curriculum/challenges/english/blocks/lecture-working-with-data-fetching-and-memoization-in-react/67d2f4ddb4a4306fdf5bbaee.md @@ -124,9 +124,7 @@ function ExpensiveSquare({ num }) { export default ExpensiveSquare; ``` -This will make sure the function is memoized by caching the result, so calculation happens only when the `num` variable changes, not when anything changes in the component it's being used in. - -The `calculateSquare` function call is not running any time `timer` changes anymore but on the initial render and when `num` changes. +This will make sure the function is memoized by caching the result. Even though the `ExpensiveSquare` component still re-renders every time the parent's `timer` state updates, the `calculateSquare` computation only re-runs on the initial render and when `num` changes. # --questions--