mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

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

useDedupe callback (#4855)

authored by

GSMT and committed by
GitHub
c3e77b56 8ddb28d3

+2 -2
+2 -2
src/lib/hooks/useDedupe.ts
··· 3 3 export const useDedupe = () => { 4 4 const canDo = React.useRef(true) 5 5 6 - return React.useRef((cb: () => unknown) => { 6 + return React.useCallback((cb: () => unknown) => { 7 7 if (canDo.current) { 8 8 canDo.current = false 9 9 setTimeout(() => { ··· 13 13 return true 14 14 } 15 15 return false 16 - }).current 16 + }, []) 17 17 }