M
M
mishapsv2015-11-25 12:58:58
React
mishapsv, 2015-11-25 12:58:58

How to determine and use the height of certain components?

There are several components placed in the parent.
It is necessary, depending on whether they are present or not, and on what their height is, to set the upper padding of the parent element.
I made an example diagram here .
Only heightHeader and heightAlert must be equal to the height of the respective components.
Tell me what to use or where to read, I can’t find anything.
(I tried var heightHeader = React.findDOMNode(this.refs.header), but apparently I'm not using it that way, because it returns null).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
max107, 2015-11-25
@max107

To get the DOM element in React <= 0.13 you need var el = React.findDOMNode(this.refs.my_name_node); $(el)... in React >= 0.14 $(this.refs.my_name_node)...
Unfortunately the link doesn't open, returns 504

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question