useLayoutEffect again

This commit is contained in:
Lim Chee Aun 2023-06-14 17:37:54 +08:00
parent 3b3e0e6fde
commit a8c2287038

View file

@ -7,6 +7,7 @@ import { memo } from 'preact/compat';
import {
useCallback,
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
@ -1089,7 +1090,7 @@ function SubComments({
}, []);
const detailsRef = useRef();
useEffect(() => {
useLayoutEffect(() => {
function handleScroll(e) {
e.target.dataset.scrollLeft = e.target.scrollLeft;
}