title: React Native Error - `Device: Undefined is not an object (evaluating 't.apply')`
body: <p>First, the code: </p>
  
  <pre><code> export default class App extends React.Component {
    constructor() {
      super()
      this.state = {
        count: 0,
      }
    }
    componentDidMount() {
      setInterval(this.inc, 1000)
    }
  
    inc = () =&gt; {
      this.setState(prevState =&gt; ({
        count: prevState.count + 1,
      }))
    }
  
    render() {
      return (
        &lt;View&gt;
          &lt;Text&gt;{this.state.count}&lt;/Text&gt;
        &lt;/View&gt;
      );
    }
  }
  </code></pre>
  
  <p>Before I run this code on an emulator (or even a real device for that matter), the IDE/compiler shows no error. But once I try running the code on emulator or a real device I get the error stated in the title of this question.</p>
  
  <p>I was able to narrow down the problem by trying a few things here and there. Instead of calling <code>inc()</code> through the <code>setInterval()</code> method, I instead used a button to increment <code>this.state.count</code>. This seemed to work as expected on the emulator and a real device. However, using <code>setInterval</code> through <code>componentDidMount</code> does't seem to work!
  Can someone help me figure out what I am doing wrong?</p>
  
  <p>Here is a link to the screenshot of the error message I am getting when the code is run on a real device. </p>
  
  <p><a href="https://drive.google.com/open?id=1ughXqTB4VE1y5Kuz-BPrqbx68y4BLG9c" rel="nofollow noreferrer">https://drive.google.com/open?id=1ughXqTB4VE1y5Kuz-BPrqbx68y4BLG9c</a></p>
  
  <p>The device is Moto G5 Plus. </p>
  
  <p>I am using the Expo (snack.expo.io) browser IDE to write React Native code.</p>
  
  <p>P.S. I have not included stylesheet code and <code>import</code> statements for simplicity.  </p>