File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ function MyComponent() {
22
22
// optionally you can pass options, those are default:
23
23
let options = {
24
24
throttle: 100 ,
25
- passive: true ,
26
25
}
27
26
let position = useWindowScrollPosition (options)
28
27
// position == { x: 0, y: 0 }
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ let getPosition = () => ({
20
20
21
21
let defaultOptions = {
22
22
throttle : 100 ,
23
- passive : true ,
24
23
}
25
24
26
25
function useWindowScrollPosition ( options ) {
@@ -36,7 +35,7 @@ function useWindowScrollPosition(options) {
36
35
window . addEventListener (
37
36
'scroll' ,
38
37
handleScroll ,
39
- supportsPassive && opts . passive ? { passive : true } : false
38
+ supportsPassive ? { passive : true } : false
40
39
)
41
40
42
41
return ( ) => {
You can’t perform that action at this time.
0 commit comments