Deleted Comment
Paul Feyerabend has a book called Against Method in which he essentially argues that it was the Catholic Church who was following the classical "scientific method" of weighing evidence between theories, and Galileo's hypothesis was rationally judged to be inferior to the existing models. Very fun read.
Threads has extreme normies, bluesky has the nerds, and twitter seems to have just the right mixture of both.
Today it turns out Apple not only proposed but implemented and shipped the actual feature last year. "It could be an interesting opportunity to reboot a few long-lost dreams". "I kind of get both sides here". "I guess I personally come down to leaving this turned on in Safari for now, and seeing what happens". Granted, the overall sentiment is still negative but the difference in tone is stark. The reality distortion field is alive and well, folks.
Once you know about the reactive render cycle, it becomes a second nature to never create any object other than via a memo function with declared dependencies. Anything else—any instance of something like <Component someProp={[1, 2, 3]} />—is, to me, just a bug on the caller side, not something to be accommodated.
Furthermore, ensuring referential equality has benefits beyond avoiding re-renders (which I would acknowledge should generally be harmless, although are in practice a source of hard to spot issues and loops on occasion).
— First, it serves as a clarity aid and documentation for yourself. It helps maintain a mental graph like “caller-provided props A and B are used to compute prop C for a downstream component”. Code organized this way tends to have self-evident refactor routes, and logic naturally localizes into cohesive sub-blocks with clearly defined inputs and outputs.
— Second, and it is obviously an ES runtime thing, but it is simply weird to have to reason about objects being essentially the same but different—and if memoization allows me to not have to do it and, with some discipline, make it safe to assume that (() => true) is the same as (() => true), why pass on that opportunity?
That said, now that I see an alternative take on this, I will make sure to document my approach in the development guidelines section of the README.
personally, I want to have a comprehensive understanding of exactly when and why each of my components re-renders, and to do that I use hooks and design around referential equality. like you said, it's a kind of documentation, more about organization than performance.
not to say that this way is intrinsically better! just that the style is appealing for its own reasons