Skip to content

Instantly share code, notes, and snippets.

View donni106's full-sized avatar

Daniel donni106

View GitHub Profile
@marcometz
marcometz / cap restart
Last active July 1, 2022 13:09
restart with capistrano and maintenance
cap production deploy
cap production maintenance:enable
cap production unicorn:stop
cap production unicorn:stop
cap production unicorn:start
cap production maintenance:disable
cap staging deploy
cap staging maintenance:enable
cap staging unicorn:stop
@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