title: React Native Component cannot use super
body: <p>I've created a component with a few functions for React components that I'd like to use in multiple components.</p>
  
  <p>I've tried implementing it, but whenever I try to call <code>super.updateHeader</code>, it crashes with error</p>
  
  <pre><code>ExceptionsManager.js:84 Unhandled JS Exception: TypeError: TypeError:  
  Cannot read property 'call' of undefined
  </code></pre>
  
  <p>Using <code>super</code> in the constructor works without an issue.
  Trying to reach the function with <code>this.updateHeader</code> results in</p>
  
  <pre><code>Unhandled JS Exception: TypeError: TypeError: this.updateHeader is not a function
  </code></pre>
  
  <p>Neither <code>updateHeader</code> nor the function I'm calling it from are arrow functions.</p>
  
  <p>How do I solve this? (They're instance based, so I'd like to stay away from creating some sort of library for this)</p>
  
  <p>SuperComponent:</p>
  
  <pre><code>class CustomRouteViewComponent extends Component {
      updateHeader(props) {
          const {settings, navigation} = props;
  
          props.navigation.setParams({
              headerTintColor: settings.theme === 'dark' ? commonColorDark.textColor : commonColor.textColor,
              backgroundColor: settings.theme === 'dark' ? commonColorDark.headerStyle : commonColor.headerStyle,
          });
      };
  }
  const mapStateToProps = state =&gt; ({settings: state.settings});
  
  export default connect(mapStateToProps)(CustomRouteViewComponent);
  </code></pre>
  
  <p>HomeScreen</p>
  
  <pre><code>class Home extends CustomRouteViewComponent {
      componentWillMount() {
          this.updateHeader(this.props);
      }
      render() {
          return (
              &lt;View&gt;&lt;Text&gt;Hello!&lt;/Text&gt;&lt;/View&gt;
          )
      }
  }
  const mapStateToProps = state =&gt; ({});
  
  export default connect(mapStateToProps)(Home);
  </code></pre>