npm.io
0.0.1 • Published 11 years ago

react-only-update-on-change

Licence
MIT
Version
0.0.1
Deps
1
Vulns
5
Weekly
0

react-only-update-on-change

Implementation of React components' shouldComponentUpdate for stateful and propful components. When using this implementation as a components' shouldComponentUpdate, it will only re-render upon state and/or prop change (shallow comparison).

Usage

/** @jsx React.DOM */
var React = require("react");

var MyComponent = React.createClass({
	/* ... */
	shouldComponentUpdate: require("react-only-update-on-change"),
	/* ... */
});
/* ... */

Keywords