UNPKG

inferno-window

Version:

Inferno components for efficiently rendering large, scrollable lists and tabular data. NOTE: this is a port from the origin project written in react by @bvaughn

11 lines (9 loc) 275 B
import { Component } from 'inferno'; import shallowDiffers from './shallowDiffers'; export class PureComponent extends Component { shouldComponentUpdate(props, state) { return ( shallowDiffers(this.props, props) || shallowDiffers(this.state, state) ); } }