I understand how to avoid renders through memo, useMemo, and useCallback, my question is not about that. Rather:
Why does React, by default, choose to rerender children that don’t receive props, when the parent updates? It seems like bad separation of responsibility and unnecessary computation. It feels like the child rerender should be left to the jurisdiction of the child.
Why does React, by default, choose to rerender children whose props haven’t changed by value? Essentially I’m asking why aren’t useCallback and useMemo built in by default. Again it seems like an odd design decision.
I am not asking for solutions to make performant React code, rather trying to understand the design decisions. Kindly note most similar questions just have answers where people mention to use the 3 memoize functions. I would just like to understand why React was built the way it was. Thanks!