Someone can help me? I'd be really thankful :) The problem here is that when the width and height changes, the UseEffect doesn't run again. This is a textarea that is being resized...
const [elem, setElem] = useState<HTMLElement>(document.createElement('textarea'))
const width = window.getComputedStyle(elem, null).getPropertyValue("width");
const height = window.getComputedStyle(elem, null).getPropertyValue("height");
useEffect(() => {
setElem(document.getElementById("email") as HTMLElement)
console.log(width, height)
},[elem, width, height])