How to use the react-addons-pure-render-mixin.shouldComponentUpdate function in react-addons-pure-render-mixin

To help you get started, we’ve selected a few react-addons-pure-render-mixin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github asutherland / glodastrophe / www / lib / react-list.js View on Github external
length: 0,
        pageSize: 10,
        threshold: 500
      },
      enumerable: true
    }]);

    return List;
  })(_React.Component);

  exports.List = List;

  // asuth-hack: this is where the pure render mixin canonically lives now;
  // this whole file should be rebuilt/updated/whatever, but this works for now.
  List.prototype.shouldComponentUpdate =
    require('react-addons-pure-render-mixin').shouldComponentUpdate;

  var UniformList = (function (_List) {
    function UniformList() {
      _classCallCheck(this, UniformList);

      if (_List != null) {
        _List.apply(this, arguments);
      }

      this.state = {
        from: 0,
        itemHeight: this.props.itemHeight || 0,
        itemsPerRow: this.props.itemsPerRow || 1,
        size: 1
      };
    }
github expo / ex-navigation / src / navigation-experimental / NavigationHeader.js View on Github external
shouldComponentUpdate(nextProps: Props, nextState: any): boolean {
    return ReactComponentWithPureRenderMixin.shouldComponentUpdate.call(
      this,
      nextProps,
      nextState
    );
  }
github ihmeuw / ihme-ui / src / ui / axis-chart / src / axis-chart.jsx View on Github external
shouldComponentUpdate(nextProps, nextState) {
    return !nextProps.loading && PureRenderMixin.shouldComponentUpdate(this, nextProps, nextState);
  }
github younth / react-router-redux-mobile-spa / app / router.jsx View on Github external
constructor(props, context) {
        super(props, context);
        this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
        this.updateHandle = this.updateHandle.bind(this)
    }
github younth / react-router-redux-mobile-spa / app / containers / App.jsx View on Github external
constructor(props, context) {
        super(props, context);
        this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
        this.state = {}
    }
github younth / react-router-redux-mobile-spa / app / containers / 404.jsx View on Github external
constructor(props, context) {
        super(props, context);
        this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
    }
    render() {

react-addons-pure-render-mixin

>**Note:** >This is a legacy React addon, and is no longer maintained. > >We don't encourage using it in new code, but it exists for backwards compatibility. >The recommended migration path is to use [`React.PureComponent`](https://facebook.github.io/re

MIT
Latest version published 3 years ago

Package Health Score

78 / 100
Full package analysis