title: React Native, onPress not firing
body: <p>Cannot get any output from my function <code>test()</code> which I have written in <code>Boxes.js</code> when I add <code>onPress={test}</code> to my <code>View</code> tag in <code>Dice.js</code>.
  I have tried to add <code>test()</code> on tags like <code>Text</code>, then it works, but not when I put it on the View tag.</p>
  <p>Boxes.js:</p>
  <pre><code>import react from &quot;react&quot;;
  import { StyleSheet, Text, View, Image } from &quot;react-native&quot;;
  
  import Dice from &quot;./Dice&quot;;
  import PatternDivider from &quot;./PatternDivider&quot;;
  
  export function test() {
    console.log(&quot;hi&quot;);
  }
  
  export default class Boxes extends react.Component {
    render() {
      return (
        &lt;View style={styles.box}&gt;
          &lt;Text style={styles.header}&gt;Advice #117&lt;/Text&gt;
          &lt;Text style={styles.advice}&gt;
            It is easy to sit up and take notice, what's difficult is getting uu
            and taking action
          &lt;/Text&gt;
          &lt;PatternDivider /&gt;
          &lt;Dice /&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>
  <p>Dice.js:</p>
  <pre><code>import react from &quot;react&quot;;
  import { StyleSheet, Text, View, Image } from &quot;react-native&quot;;
  
  import { test } from &quot;./Boxes&quot;;
  
  export default class Dice extends react.Component {
    render() {
      return (
        &lt;View style={styles.circle} onPress={test}&gt;
          &lt;Image
            source={require(&quot;../assets/icon-dice.png&quot;)}
            style={styles.dice}
          /&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>