title: how to get height of react-native component?
body: <p>how to get the height of react component? I want to use the height value of a component as padding's value of other component, how to do it in react native? for example, I made a picker component from</p>
  <pre><code>import { Picker } from '@react-native-picker/picker';
  </code></pre>
  <p>I want to make a <code>&lt;view&gt;</code> component with padding value <code>padding:{Picker}.height</code>, how to do it?</p>
  <p><strong>update</strong></p>
  <p>thanks to @Aseem Gautam and @Aniket Kolekar, I have tried the solution for Picker Component but its not working, it worked nicely when I try it with View Component. why that could happen? does it mean the Picker Component not inherits View props? here the code that I have tried</p>
  <pre><code>import React, { Component } from &quot;react&quot;;
  import { View, Text, SectionList } from &quot;react-native&quot;;
  import { Picker } from &quot;@react-native-picker/picker&quot;;
  
  export default class App extends Component {
    find_dimension(layout){
      const {x, y, width, height} = layout;
      console.warn(x);
      console.warn(y);
      console.warn(width);
      console.warn(height);
    }
  
    render(){
      return(
        &lt;View&gt;
          &lt;Picker onLayout={(event) =&gt; {this.find_dimension(event.nativeEvent.layout)}}&gt;
            &lt;Picker.Item label=&quot;Java&quot; value=&quot;java&quot; /&gt;
            &lt;Picker.Item label=&quot;JavaScript&quot; value=&quot;js&quot; /&gt;
          &lt;/Picker&gt;
        &lt;/View&gt;
      )
    }
  }
  </code></pre>