Skip to content

Instantly share code, notes, and snippets.

@addyosmani
Created July 24, 2014 17:48
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save addyosmani/8058dfe6272b43d19fec to your computer and use it in GitHub Desktop.
Save addyosmani/8058dfe6272b43d19fec to your computer and use it in GitHub Desktop.
Minor corrections

React vs. Object.observe()

Object.observe() and React are actually aimed at solving different problems. If we're going to mention React, I would say..

"Facebook are also exploring how to improve performance when building non-trivial apps via their framework, React. React provides a virtual DOM with rendering capabilities that avoid excessive layout thrashing (when JavaScript writes then reads from the DOM multiple times causing reflows). React batches such reads and writes to keep things fast. In a typical webapp we might heavily interact with the DOM, which is expensive to update. React prefers to avoid mutating the DOM directly, instead building a virtual DOM where it can handle updating the real DOM to match."

Milliseconds

"In a test, dirty checking took 40 milliseconds compared to Object.observe’s 1 to 2 minutes. In other words, Angular became 20 to 40 times faster while using Object.observe." should read "Object.observe's() 1 to 2 milliseconds"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment