(nextProps)
| 10 | */ |
| 11 | export function memo(c, comparer) { |
| 12 | function shouldUpdate(nextProps) { |
| 13 | let ref = this.props.ref; |
| 14 | if (ref != nextProps.ref && ref) { |
| 15 | typeof ref == 'function' ? ref(null) : (ref.current = null); |
| 16 | } |
| 17 | |
| 18 | return comparer |
| 19 | ? !comparer(this.props, nextProps) || ref != nextProps.ref |
| 20 | : shallowDiffers(this.props, nextProps); |
| 21 | } |
| 22 | |
| 23 | function Memoed(props) { |
| 24 | this.shouldComponentUpdate = shouldUpdate; |
nothing calls this directly
no test coverage detected
searching dependent graphs…