Skip to content

Commit c9cec7a

Browse files
committed
Don't set shouldComponentUpdate
1 parent 1bb0072 commit c9cec7a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

ScrollListenerMixin.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,14 @@ var ScrollListenerMixin = {
3131
}
3232
},
3333

34-
shouldComponentUpdate: function(nextProps, nextState) {
35-
return (
36-
nextState.scrollTop !== this.state.scrollTop ||
37-
nextState.isScrolling !== this.state.isScrolling
38-
)
39-
},
40-
4134
_onPageScrollEnd: function () {
4235
var scrollTop = getScrollTop();
4336
if (scrollTop === this.state.scrollTop) {
4437
win.clearTimeout(this._pageScrollTimeout);
4538
this.setState({ isScrolling: false });
4639

4740
if (typeof this.props.onPageScrollEnd === 'function') {
48-
this.props.onPageScrollEnd(scrollTop, isScrolling);
41+
this.props.onPageScrollEnd(scrollTop);
4942
}
5043
}
5144
},
@@ -67,4 +60,4 @@ var ScrollListenerMixin = {
6760
}
6861
};
6962

70-
module.exports = ScrollListenerMixin;
63+
module.exports = ScrollListenerMixin;

0 commit comments

Comments
 (0)