Skip to content

Commit 1e9cb34

Browse files
committed
1.0.3
1 parent 45d1988 commit 1e9cb34

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
# 1.0.3 Release
4+
5+
**Summary:** Fixed unmount bug affecting IntersectionObserver.
6+
37
# 1.0.2 Release
48

59
**Summary:** Deps update.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-soft-slider",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Simple, fast and impartial slider",
55
"main": "web.cjs.js",
66
"module": "web.js",
@@ -81,7 +81,7 @@
8181
"lodash.clamp": "^4.0.3",
8282
"prop-types": "^15.7.2",
8383
"react-spring": "^9.0.0-beta.8",
84-
"react-use-gesture": "^5.1.1",
84+
"react-use-gesture": "^5.1.2",
8585
"use-resize-observer": "^3.1.0"
8686
}
8787
}

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export function Slider({
8080
}, [children.length, root])
8181

8282
// removing the observer on unmount
83-
useEffect(() => observer.current.disconnect, [])
83+
useEffect(() => () => observer.current.disconnect(), [])
8484

8585
// setting the springs with initial position set to restPos:
8686
// this is important when adding slides since changing children

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2674,10 +2674,10 @@ react-spring@^9.0.0-beta.8:
26742674
"@babel/runtime" "^7.3.1"
26752675
prop-types "^15.5.8"
26762676

2677-
react-use-gesture@^5.1.1:
2678-
version "5.1.1"
2679-
resolved "https://registry.yarnpkg.com/react-use-gesture/-/react-use-gesture-5.1.1.tgz#243339bf7619f0c726b6dc3715da023a330bcf81"
2680-
integrity sha512-cz1XIw7oOi9AFtiQ7WXr4/FoVdB677A9lqxP1TUa4eqKHMF7Bu1qjOEeAzwYEl4tlusKz03y9TXw5amKQu27hQ==
2677+
react-use-gesture@^5.1.2:
2678+
version "5.1.2"
2679+
resolved "https://registry.yarnpkg.com/react-use-gesture/-/react-use-gesture-5.1.2.tgz#3a43526c1174e97b20f966b86b6fb3ecc83dddb0"
2680+
integrity sha512-qOvwlru1avX6dRPHNWWJ1U6qoZf5ri6WohoIz3J3n0ieRJRzsbD1AO/bCuUgRklf6uwHnKCGzkdCgq5ilv7yRQ==
26812681

26822682
react@^16.8.6:
26832683
version "16.8.6"

0 commit comments

Comments
 (0)