1

I have a project using React and want to get width of an HTML element, but when adding document.querySelector(myElelment).clientWidthin componentDidMount() It return an uncorrect value. I assume that componentDidMount() is invoked after Virtual DOM is mounted but Real DOM isn't finishing yet. Is that true ?

0 Answers0