FixedDataTable: isMounted is deprecated

Using FixedDataTable in my react project and I was surprised to see the warning below:

warning.js:36 Warning: FixedDataTable: isMounted is deprecated. Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.

      

I figured out that isMounted is seen as antipattern Link , so I am surprised to see it in the actual source code. Did I miss something?

  _didScrollStop: function _didScrollStop() {
    if (this.isMounted() && this._isScrolling) {
      this._isScrolling = false;
      this.setState({ redraw: true });
      if (this.props.onScrollEnd) {
        this.props.onScrollEnd(this.state.scrollX, this.state.scrollY);
      }
    }
  }

      

+3


source to share





All Articles