Comment on Virtual DOM in ElmparentComments−joesb12yThis got me wondering how React handles this requirement. Can you use React if you need to know offsetWidth/Height to do complex layout?−ksherlock12yOnce the component is mounted (there's a componentDidMount callback) you have access to the real DOM node and can access them (or perhaps store them as a property if necessary). The DOM node is also available from event callbacks and such.
Comments
This got me wondering how React handles this requirement. Can you use React if you need to know offsetWidth/Height to do complex layout?
Once the component is mounted (there's a componentDidMount callback) you have access to the real DOM node and can access them (or perhaps store them as a property if necessary). The DOM node is also available from event callbacks and such.