Answer the question
In order to leave comments, you need to log in
How to get the height of a React component from another component?
Subject. There are two components that are in completely different places. I need to get the height value of another component inside one component. How to do it?
Right now I'm writing a custom hook that, when called, would pass an ID selector and return the height of the component with that ID. But I ran into a problem that in custom components the id attribute is treated as a prop, so it is not displayed in the DOM.
Answer the question
In order to leave comments, you need to log in
Now I'm writing a custom hook that would pass an ID selector when called,
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question