#Deprecated: Please use https://github.com/tkh44/shallow-compare instead
shallowCompare for preact. react-shallow-compare detached from React.
##Example
import { h, Component } from 'preact';
import shallowCompare from 'preact-shallow-compare';
class Foo extends Component {
constructor(props) {
super(props);
this.state = { color: 'blue' };
}
shouldComponentUpdate(nextProps, nextState) {
return shallowCompare(this, nextProps, nextState);
}
render() {
return h('div', null, this.state.color);
}
}