I was reading this and it got me thinking about Hyrum's Law. In particular it got me thinking about Hyrum's Law being applied to React.useMemo()
In the docs for useMemo() there is a section at the bottom with caveats, one of them is
React will not throw away the cached value unless there is a specific reason to do that. For example, in development, React throws away the cache when you edit the file of your component. Both in development and in production, React will throw away the cache if your component suspends during the initial mount. In the future, React may add more features that take advantage of throwing away the cache—for example, if React adds built-in support for virtualized lists in the future, it would make sense to throw away the cache for items that scroll out of the virtualized table viewport.
It's interesting that the docs would make a disclaimer about possible future behavioral changes. T