this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

useLayoutEffect instead

+2 -2
+2 -2
src/utils/useScroll.js
··· 1 - import { useEffect, useState } from 'preact/hooks'; 1 + import { useLayoutEffect, useState } from 'preact/hooks'; 2 2 3 3 export default function useScroll({ 4 4 scrollableRef, ··· 17 17 const [nearReachEnd, setNearReachEnd] = useState(false); 18 18 const isVertical = direction === 'vertical'; 19 19 20 - useEffect(() => { 20 + useLayoutEffect(() => { 21 21 const scrollableElement = scrollableRef.current; 22 22 if (!scrollableElement) return {}; 23 23 let previousScrollStart = isVertical