It gets even worse when you start to pass values down several layers of components when the average advice on the web is "don't overuse useMemo". For those unfamiliar it is a way to memoize a value so you get a stable reference that is only mutated if the underlying data mutates, it basically avoids this specific issue.
React wants you to code in functional immutable style, but the language doesn't provide proper immutable data structures.
cluckindan•1h ago