react
react copied to clipboard
in component render method, how to get future container's width , height?
I want to write a layout component
<layout jsxcols="300,200,*">
<div>
<layout jsxcols="100,200">
<div></div>
<div></div>
</layout>
</div>
<div> width will take 200px </div>
<div> width will take the rest width of container </div>
</layout>
how to get the future container's width , height?
use life cycle method componentDidMount to sync it , and already implement it here
Looks like you answered your own question. Closing out.
:)-