title: How would I call a function from another component in react native?
body: <p>How would I call a function from another component?</p>
  <p>App.js</p>
  <pre class="lang-js prettyprint-override"><code>&lt;Button onPress={movePopUpCard()}&gt;&lt;/Button&gt;
  &lt;PopUpCard/&gt;
  </code></pre>
  <p>PopUpCard.js</p>
  <pre class="lang-js prettyprint-override"><code>const movePopUpCard = () =&gt; {
     //Code to update popUpCardX
  }
  
  &lt;Animated.View style={[
      {transform: [{scale: scale}, {translateX: popUpCardX}]},
      {position: 'absolute'}
  ]}&gt;
  &lt;/Animated.View&gt;
  </code></pre>