Skip to content

Instantly share code, notes, and snippets.

@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

@quinkennedy
quinkennedy / openframe_install.sh
Last active September 26, 2019 17:50
wget/curl-able installation script for Openframe
#!/usr/bin/env bash
{ # this ensures the entire script is downloaded #
openframe_has() {
type "$1" > /dev/null 2>&1
}
if [ -z "$OPENFRAME_DIR" ]; then
OPENFRAME_DIR="$HOME/.openframe"