Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 3
    useEffect does NOT warranty that it will not re-render when dependencies have not changed. useMemo is the one that does not fire when dependencies have not changed. I have never had issue of extra re-renders on useMemo, contrary to useEffect that sometimes re-renders when dependencies have not changed. Instead, you want to watch out for the fact that useMemo struggles to detect some changes in some dependencies that are complex in structure. (for example, a change in an object that is inside of an array). Commented Dec 16, 2022 at 16:58