@react.dev in the old docs for useMemo (legacy.reactjs.org/docs/hooks-r...), you could read: > In the future, React may choose to “forget” some previously memoized values and recalculate them on next render But I can’t find any similar mentions of this in the new ones in react.dev/reference/re...
Post
legacy.reactjs.orgHooks API Reference – ReactA JavaScript library for building user interfaces
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
@tkdodo.eu, do you know if React changed how it was handling `useMemo()` under the hood? (as you talked about it a few years ago in tkdodo.eu/blog/use-sta...)
tkdodo.euuseState for one-time initializationsWhy you shouldn't rely on useMemo for guaranteed referential stability but prefer useState instead