React is Slow, React is Fast: Optimizing React Apps in Practice
François Zaninotto

“Immutable is heavy (60kB), so think twice before you add it to your project dependencies.” -> seems to be a good solution: you still use the regular Javascript objects, but get an error if you mutate the state (in dev).

“In fact, each time you pass an object literal as prop to a child component, you break purity.” -> There’s a similar problem with the event handlers, like onClick={() => connectedActionCreator(withOrWithoutEventParams)}, they also cause needless rerenders. Do you know a good solution without converting to stateful components?

Like what you read? Give Just RAG a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.