title: Unable to navigate to a different component on button click - React-Native Navigator
body: <pre><code>var  
    {Text,View,TextInput,TouchableWithoutFeedback,Image,ToastAndroid,Platform,NavigatorIOS,Navigator} = React;
  
  var MainActivity = require('./MainActivity');
  
  class LoginScreen extends React.Component {
  
  Login(){
  
    return  &lt;Navigator
          initialRoute={{name: 'MainActivity', component: MainActivity, index: 0}}
          renderScene={(route, navigator) =&gt;    {
  return React.createElement(&lt;MainActivity /&gt;);
    }} /&gt;
  }
  </code></pre>
  
  <p>I am trying to make this work. After clicking on login button, it should go to the main activity. So <code>LoginScreen.js</code> onClick <code>MainActivity.js</code>.</p>
  
  <p><a href="https://github.com/raja95shah/reactNative.git" rel="nofollow noreferrer">My github project</a> for you to check for more reference. Please help. </p>