title: React native: Vertically centre View inside a view
body: <p>I have a View inside a view. And I'm trying to vertically center the child view.
  Below is the sample code:</p>
  
  <pre><code>              &lt;View style={globalStyle.text}&gt;
                  &lt;Text style={[globalStyle.name]}&gt;
                    {name}
                  &lt;/Text&gt;
                  &lt;View style={globalStyle.timeContainer}&gt;
                   &lt;Image style={globalStyle.tinyIcon} source={require('./Thumbnails/time-tiny.png')}/&gt;
                  &lt;Text style={globalStyle.audio_count}&gt;
                    {this.state.audioTime[rowID]}
                  &lt;/Text&gt;
                  &lt;/View&gt;
                &lt;/View&gt;
  </code></pre>
  
  <p>When there is text alone <code>justifyContent: 'center'</code> works fine to vertically center the child content. However when there is a child <code>View</code> involved it doesn't work. How can I achieve this?</p>
  
  <p>Here is a picture of the same: I'm trying to make the text inside the white box vertically center aligned.
  <a href="https://i.stack.imgur.com/x9tUU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x9tUU.png" alt="enter image description here"></a> </p>