title: How to pass data from native android to react native?
body: <p>I want to pass one string value from native android Main Activity class to react native component. I apply this code, but once I print the "data" in the log it shows undefined. I am not able to understand what is the problem. I am a beginner in react native. Thanks in advance.</p>
  
  <p>In Main Activity: </p>
  
  <pre><code>@Override
      protected ReactActivityDelegate createReactActivityDelegate() {
          return new ReactActivityDelegate(this, getMainComponentName()) {
              @Override
              protected Bundle getLaunchOptions() {
  
                  Bundle initialProperties = new Bundle();
                  initialProperties.putString("var_1","Im the first var");
                  return initialProperties;
              }
          };
      }
  </code></pre>
  
  <p>In App.js:</p>
  
  <pre><code>export default class App extends Component&lt;Props&gt; {
  
    render() {
      var data = this.props.var_1;
      console.log(data);
      return (
        &lt;View style={styles.container}&gt;
          &lt;Text style={styles.welcome}&gt;Welcome to React Native!&lt;/Text&gt;
          &lt;Text style={styles.welcome}&gt;{this.props.var_1}&lt;/Text&gt; 
        &lt;/View&gt;
      );
    }
  }
  </code></pre>