Skip to content

Commit

Permalink
Update useLockBodyScroll implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
tylermcginnis committed Oct 9, 2023
1 parent cc2c0ed commit c90921a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ export function useLocalStorage(key, initialValue) {
}

export function useLockBodyScroll() {
React.useEffect(() => {
React.useLayoutEffect(() => {
const originalStyle = window.getComputedStyle(document.body).overflow;
document.body.style.overflow = "hidden";
return () => {
Expand Down

0 comments on commit c90921a

Please sign in to comment.