Skip to content

Commit

Permalink
Adding options to dependency array
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgperry committed Aug 30, 2023
1 parent f94ff47 commit 06a4686
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Undocumented APIs should be considered internal and may change without warning.
### Fixed

- Improved compatibility of custom `RefObject` and `MutableRefObject` types.
- Fixing `useScroll` dependencies array.

## [10.16.2] 2023-08-30

Expand Down
2 changes: 1 addition & 1 deletion packages/framer-motion/src/value/use-scroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function useScroll({
target: target?.current || undefined,
}
)
}, [JSON.stringify(options.offset)])
}, [container, target, JSON.stringify(options.offset)])

return values
}

0 comments on commit 06a4686

Please sign in to comment.