From 61dd7bed0538561e7a5ed1fa08dde1f7af092fd6 Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 19 Sep 2019 14:18:34 -0400 Subject: [PATCH 1/3] fix componentWillReceiveProps is deprecated --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index a47d574..b3eadd4 100644 --- a/index.js +++ b/index.js @@ -110,7 +110,7 @@ export default class Carousel extends Component { this._clearTimer(); } - componentWillReceiveProps({ children }) { + UNSAFE_componentWillReceiveProps({ children }) { if (!isEqual(this.props.children, children)) { const { currentPage } = this.state; this._clearTimer(); From 85ebbb2227ba479d98e699b0cbd33f5310f293e6 Mon Sep 17 00:00:00 2001 From: Javier Date: Thu, 19 Sep 2019 17:52:51 -0400 Subject: [PATCH 2/3] Fix for warning message scrollEventThrottle --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index b3eadd4..64e5b21 100644 --- a/index.js +++ b/index.js @@ -408,6 +408,7 @@ export default class Carousel extends Component { onScrollBeginDrag={this._onScrollBegin} onMomentumScrollEnd={this._onScrollEnd} onScroll={this._onScroll} + scrollEventThrottle={16} alwaysBounceHorizontal={false} alwaysBounceVertical={false} contentInset={{ top: 0 }} From 22c24ddf4b92de33e9aa0073d63537a3188ddad9 Mon Sep 17 00:00:00 2001 From: Javier Glenn Date: Fri, 29 Sep 2023 12:35:15 -0400 Subject: [PATCH 3/3] Update index.js Co-authored-by: Will Parker --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 64e5b21..ff43cc1 100644 --- a/index.js +++ b/index.js @@ -110,6 +110,7 @@ export default class Carousel extends Component { this._clearTimer(); } + // eslint-disable-next-line no-console UNSAFE_componentWillReceiveProps({ children }) { if (!isEqual(this.props.children, children)) { const { currentPage } = this.state;