import React, {useState} from 'react'
let Block = () => {
let [coors, setCoors] = useState(null)
return (
<div>Hello World </div>
)
}
componentDidMount()
или useEffect()
обращаться к ref.current
const ref = useRef();
useEffect(() => {
const rect = ref.current.getBoundingClientRect();
});
return <div ref={ref} />;