Skip to content

Instantly share code, notes, and snippets.

View mcdougald's full-sized avatar

Trevor McDougald mcdougald

View GitHub Profile
@Jabarabo
Jabarabo / githubpull.md
Last active October 10, 2025 04:04
Gist of a stolen gist
@sebmarkbage
sebmarkbage / The Rules.md
Last active October 25, 2025 11:39
The Rules of React

The Rules of React

All libraries have subtle rules that you have to follow for them to work well. Often these are implied and undocumented rules that you have to learn as you go. This is an attempt to document the rules of React renders. Ideally a type system could enforce it.

What Functions Are "Pure"?

A number of methods in React are assumed to be "pure".

On classes that's the constructor, getDerivedStateFromProps, shouldComponentUpdate and render.

@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing
@mbostock
mbostock / README.md
Last active June 7, 2023 18:33
Underscore’s Equivalents in D3

Collections

each(array)

Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });