We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2c0ed commit c90921aCopy full SHA for c90921a
index.js
@@ -634,7 +634,7 @@ export function useLocalStorage(key, initialValue) {
634
}
635
636
export function useLockBodyScroll() {
637
- React.useEffect(() => {
+ React.useLayoutEffect(() => {
638
const originalStyle = window.getComputedStyle(document.body).overflow;
639
document.body.style.overflow = "hidden";
640
return () => {
0 commit comments