by sickcodebruh · 6y ago · 0 comments
function useFirstRenderComplete() {
const renderCountRef = useRef(0);
useEffect(() => {
if (renderCountRef.current) {
return;
}
renderCountRef.current += 1;
}, []);
return renderCountRef.current !== 0;
}No comments yet.