Open nnkystk opened 2 years ago
const Sample = () => { const ref: any | null = useRef(null); useEffect(() => { console.log(ref.current); console.log( JSON.stringify(ref.current.getBoundingClientRect()) ); }, []); return ( <div ref={ref}> <h1> Sample </h1> </div> ); };