Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
<div style={{height:400}}></div> <div style={{height:someHeight}}></div>
const el = React.createRef(); const [height, setH] = useState(); useEffect(() => setH(el.current.style.height)); <div ref={el} /> <div style={{height: height}}/>
function showText() { setTextHeight(titleWrap.current.clientHeight + 40) setTextClass(true) }