Efficient shallow equality algorithm for React and React Native.
This is a fork of lelandrichardson/shallow-element-equals.
yarn add react-shallow-equal
# or
npm install --save react-shallow-equal
import React, {PureComponent} from 'react';
import {propsEqual} from 'react-shallow-equal';
// ...
shouldComponentUpdate(nextProps) {
return !propsEqual(this.props, nextProps);
}
// ...
See lelandrichardson/style-equal