Skip to content

useMemo() only memoizes one value - #2769

Open
KennethKinLum wants to merge 1 commit into
reactjs:mainfrom
KennethKinLum:patch-6
Open

useMemo() only memoizes one value#2769
KennethKinLum wants to merge 1 commit into
reactjs:mainfrom
KennethKinLum:patch-6

Conversation

@KennethKinLum

Copy link
Copy Markdown
Contributor

Compare https://stackblitz.com/edit/react-ueeptk?file=index.js
and https://stackblitz.com/edit/react-hpugxu?file=index.js
As in the second example, it recalculates when the dependency changes from 1 to 2 and 1...

Compare  https://stackblitz.com/edit/react-ueeptk?file=index.js
and https://stackblitz.com/edit/react-hpugxu?file=index.js
As in the second example, it recalculates when the dependency changes from 1 to 2 and 1...
@reactjs-bot

Copy link
Copy Markdown

Deploy preview for reactjs ready!

Built with commit b2e2a89

https://deploy-preview-2769--reactjs.netlify.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants