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
reactjs fixed-data-table


source to share


No one has answered this question yet

Check out similar questions:

28
Warning about setting setState in unmounted component
24
Warning: isMounted (...) is deprecated in plain Javascript classes
6
ReactJS: When should setState be set with isMounted?
3
Invalid example of sorting and filtering ReactJS FixedDataTable
2
unmounted, track your own property
1
Socket.io React Callbacks
1
React Native - Can't get TabNavigator to work
0
How to properly clear Redux state when exiting a view without issue Asynch componentWillUnmount
0
React native TabView. What happens when I change tabs?
0
React FixedDataTable cell always gets all undefined



All Articles
Loading...
X
Show
Funny
Dev
Pics