3

Using FixedDataTable in my react project and im suprised 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.

What I've understood is that isMounted is seen as an antipattern Link so im suprised to see it in the actual source code. Am I missing something here?

  _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);
      }
    }
  }
KornholioBeavis
  • 2,402
  • 2
  • 19
  • 26
  • It's probably just legacy code that needs updating. The fact that the blog post is dated nearly 2 years ago, and it is still just deprecated (not removed) supports that. – Cjmarkham Jun 21 '17 at 17:58
  • sure, but i think through webpack upgrade this warning is filling up my console – KornholioBeavis Jun 21 '17 at 18:19
  • Then you have 3 options. 1) Open up the source code where the error is thrown and comment it out (dont recommend). 2) Disable yellow box warnings (config variable, also don't recommend). 3) Use a different package for fixed data tables – Cjmarkham Jun 21 '17 at 18:24

0 Answers0