title: undefined is not an object (evaluating this.props.navigation.navigate)
body: <p>I'm trying to learn react native for the first time.  I tried to introduce a stacknavigator but the line <code>const {navigate} = this.props.navigation;</code> is causing the error:</p>
  
  <blockquote>
    <p>undefined is not an object (evaluating
    'this.props.navigation.navigate')</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>import React, { Component } from "react";
  import { StackNavigator } from "react-navigation";
  import { AppRegistry, Text, View } from "react-native";
  
  export default class App extends Component {
    static navigationOptions = {
      title: "Login",
      headerStyle: {
        backgroundColor: "#000000"
      },
      headerTitleStyle: {
        color: "#fff"
      }
    };
  
    constructor(props) {
      super(props);
    }
    render() {
      console.log(this.props);
  
      const { navigate } = this.props.navigation;
      return (
        &lt;View&gt;
          &lt;Text&gt;Hello&lt;/Text&gt;
        &lt;/View&gt;
      );
    }
  }
  
  const myscreens = StackNavigator({
    Home: { screen: App }
  });
  AppRegistry.registerComponent("app", () =&gt; myscreens);
  </code></pre>
  
  <p>What am I doing wrong and how do I fix this?</p>
  
  <p>I should also mention that props is empty in the render function and in the constructor.  </p>
  
  <p><strong>here's my package.json incase it matters</strong></p>
  
  <pre><code>{
    "name": "myapp",
    "version": "0.0.1",
    "private": true,
    "scripts": {
      "start": "node node_modules/react-native/local-cli/cli.js start",
      "test": "jest"
    },
    "dependencies": {
      "react": "16.0.0-alpha.12",
      "react-native": "0.48.3",
      "react-navigation": "git+https://github.com/react-community/react-navigation.git"
    },
    "devDependencies": {
      "babel-jest": "21.0.2",
      "babel-preset-react-native": "4.0.0",
      "jest": "21.1.0",
      "react-test-renderer": "16.0.0-alpha.12"
    },
    "jest": {
      "preset": "react-native"
    }
  }
  </code></pre>
  
  <p>And here's my index.android.js</p>
  
  <pre><code>import React, { Component } from 'react';
  import App from './components/app';
  import {
    AppRegistry,
    View
  } from 'react-native';
  
  export default class myapp extends Component {
    render() {
      return (
          &lt;App /&gt;
      );
    }
  }
  
  
  AppRegistry.registerComponent('myapp', () =&gt; myapp);
  </code></pre>