1 2 3 4 5 6 7 8 9 | 2x 8x 2x 2x | import isEqual from 'lodash.isequal' import {Component} from 'react' export default class Pure extends Component { shouldComponentUpdate (newProps, newState) { return !isEqual(newProps, this.props) || !isEqual(newState, this.state) } } |