title: ComponentDidCatch does not work
body: <p>Why <code>componentDidCatch</code> does not work in my react-native app.
  <code>componentDidCatch</code> does not handle errors.</p>
  
  <pre><code>React native v: 50.3
  React: 16.0.0
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import React, {Component} from 'react';
  import {View, Text}        from 'react-native';
  import Logo               from './SignUpInit/Logo';
  import SignUp             from './SignUpInit/SignUp';
  import Social             from './SignUpInit/Social';
  import styles             from './SignUpInit/styles';
  
  export default class SignUpInit extends Component {
  
      state = {
          componentCrashed: false,
          count: 0,
      }
  
      componentDidCatch(error, info) {
          console.log(error);
          console.log(info);
          console.log('_______DID CATCH____________');
          this.setState({componentCrashed: true});
      }
  
      componentDidMount(){
          setInterval(()=&gt;this.setState({count: this.state.count+1}),1000);
      }
  
      render() {
          if (this.state.componentCrashed) {
              return (
                  &lt;View&gt;
                      &lt;Text&gt;
                          Error in component "SingUpInit"
                      &lt;/Text&gt;
                  &lt;/View&gt;
              );
          }
  
          if(this.state.count &gt; 5){
              throw new Error('Error error error');
          }
  
  
          return (
              &lt;View style={styles.main}&gt;
                  &lt;Logo/&gt;
                  &lt;SignUp/&gt;
                  &lt;Social/&gt;
              &lt;/View&gt;
          );
      }
  }</code></pre>
  </div>
  </div>
  </p>