Post

The new docs, even say: “React will return the same value again if the dependencies have not changed since the last render” Does it mean that going forward, React will 100% treat dependencies as exact and only re-compute useMemo when they changed, but not otherwise?

0 reposts0 likes

It’s still the same: no semantic guarantee, only a performance improvement, your code should work exactly the same when useMemo is removed. If anything, offscreen rendering (<Activity>) will lead to more memos being thrown away.

The old docs you mentioned used to say: "e.g. to free memory for offscreen components". I think this is still accurate