title: React Native ReferenceError Can't find variable
body: <p>Have been going through the documentation in <a href="https://facebook.github.io/react-native/docs/text.html" rel="noreferrer">https://facebook.github.io/react-native/docs/text.html</a> . Its not clear how to link the reference between the two classes. I am trying to use the tag  instead of  and it this gives no reference found error.</p>
  
  <p>Code : </p>
  
  <pre><code>import React, {Component} from 'react';
  import {
      Text,
      View,
      AppRegistry,
  } from 'react-native';
  
  class MyAppHeaderText extends Component {
  
      render() {
          return(
              &lt;MyAppHeader&gt;
                  &lt;Text style={{fontSize:20}}&gt;
                      {this.props.children}
                  &lt;/Text&gt;
              &lt;/MyAppHeader&gt;
          )
      }
  }
  
  class Test2 extends Component {
  
      constructor(props){
          super(props);
  
          this.state = {
              mainText: 'This is Bird',
              subText : 'Not dino'
          }
      }
  
      render() {
          return(
              &lt;View&gt;
                  {/* &lt;Text&gt;
  
                      {this.state.mainText}
                      {this.state.subText}
                  &lt;/Text&gt; */}
                  &lt;MyAppHeaderText&gt;
                      &lt;MyAppHeader&gt;
                          {this.state.mainText}
                          {this.state.subText}
                      &lt;/MyAppHeader&gt;
                  &lt;/MyAppHeaderText&gt;
              &lt;/View&gt;
          )
      }
  }
  
  export default MyAppHeaderText;
  
  AppRegistry.registerComponent('AwesomeProject',() =&gt; Test2);
  </code></pre>
  
  <p>Error :</p>
  
  <blockquote>
    <p>ReferenceError: Can't find variable: MyAppHeader</p>
    
    <p>This error is located at: 
    in Test2 (at renderApplication.js:35) 
    in RCTView (at View.js:113) 
    in View (at AppContainer.js:102) 
    in RCTView (at View.js:113) 
    in View (at AppContainer.js:122) 
    in AppContainer (at renderApplication.js:34)</p>
  </blockquote>