title: How to make parent's width wrap its content in React Native?
body: <p>I am new to React Native so this might be a silly question.</p>
  
  <p>What I am trying to get is something like this :
  <a href="https://i.stack.imgur.com/dY0gn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dY0gn.png" alt="enter image description here"></a></p>
  
  <p>Where I have a parent view with 2 children, Image and Text, aligned vertically to the left. What I want is the parent view to cover only the width of its children. But instead what I get is this :</p>
  
  <p><a href="https://i.stack.imgur.com/43uec.png" rel="noreferrer"><img src="https://i.stack.imgur.com/43uec.png" alt="enter image description here"></a></p>
  
  <p>The parent view stretches to the complete width of the mobile screen.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>render () (&lt;View style={{backgroundColor: '#333333'}}&gt;
    &lt;Image source={btnImageSource} /&gt;
    &lt;Text&gt;Some label&lt;/Text&gt;
  &lt;/View&gt;);
  </code></pre>
  
  <p><strong>Something similar to Android's 'wrap-content' width value.</strong></p>