1 | import { shallowEqual } from '@tarojs/utils'
|
2 |
|
3 | import Component from './component'
|
4 |
|
5 | class PureComponent extends Component {
|
6 | isPureComponent = true
|
7 |
|
8 | shouldComponentUpdate (nextProps, nextState) {
|
9 | return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state, nextState)
|
10 | }
|
11 | }
|
12 |
|
13 | export default PureComponent
|