Skip to content

Instantly share code, notes, and snippets.

View vandervidi's full-sized avatar
🎯
Focusing

Vidran Abdovich vandervidi

🎯
Focusing
View GitHub Profile
@armw4
armw4 / redux-is-smarter-than-you-think.md
Last active June 19, 2021 20:10
Optimizing your react components via redux....shouldComponentUpdate for free and more...

The Beginning

Yes...it's true...redux is smart....smarter than you even know. It really does want to help you. It strives to be sane and easy to reason about. With that being said, redux gives you optimizations for free that you probably were completely unaware of.

connect()

connect is the most important thing in redux land IMO. This is where you tie the knot between redux and your underlying components. You usually take state and propogate it down your component hiearchy in the form of props. From there, presentational