Skip to content

Instantly share code, notes, and snippets.

View enochychang's full-sized avatar

Enoch Chang enochychang

  • Los Angeles, CA
View GitHub Profile
@fongandrew
fongandrew / react-bind.md
Last active January 14, 2024 16:02
Explaining why we bind things in React

Start With This

Before getting to React, it's helpful to know what this does generally in Javascript. Take the following snippet of code. It's written in ES6 but the principles for this predate ES6.

class Dog {
  constructor() {