Skip to content

Instantly share code, notes, and snippets.

@jonsherrard
Last active January 26, 2017 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonsherrard/7bff3b40d6372e8f680352a01616b20b to your computer and use it in GitHub Desktop.
Save jonsherrard/7bff3b40d6372e8f680352a01616b20b to your computer and use it in GitHub Desktop.

(also know as lies and/or alternative facts)

js

  • setImmediate - doesn't set anything immediately, waits for a tick before executing
  • setTimeout(fn, n) - never sets the timeout to exactly n
  • Math.random() - computers cannot generate random numbers
  • Promise - is a lie when rejected
  • Array.reduce - accumulates, does not reduce (via @sbmadhav)
  • const - isn't constant, can be mutated (via adamwknox)

react

  • setState - doesn't set, but enqueues a state change
  • createElement - creates a description of the actual element
  • instance::render() - doesn't actually render
  • componentWillMount - component might not mount
  • react (!) - doesn't react immediately, schedules changes instead

misc

  • babel - speaks only one language (though understands many)
  • rxjs - rx implies prescription, not subscription
  • javascript - isn't a scripting language for java, or related to java in any way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment