Skip to content

Instantly share code, notes, and snippets.

@petehunt
Created January 24, 2014 10:43
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 petehunt/8595248 to your computer and use it in GitHub Desktop.
Save petehunt/8595248 to your computer and use it in GitHub Desktop.

It looks like ReactDefaultPerf found some places you could add shouldComponentUpdate(). Great!

Keep in mind that just because there are lots of items in the table does not mean you need to add lots of shouldComponentUpdate() methods. Instead, simply try adding one to the highest-ranked component in the table and re-running the perf test. Often you'll see that it takes care of the other components on the list automatically for you.

For more information about shouldComponentUpdate() see http://facebook.github.io/react/docs/component-specs.html#updating-shouldcomponentupdate

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