react-navigation beta.9 引用错误



  • package.json

    "dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.44.0",
    "react-navigation": "^1.0.0-beta.9"
    }

    index.android.js

    import React from 'react';
    import {
    AppRegistry,
    Text,
    } from 'react-native';
    import { StackNavigator } from 'react-navigation';

    class MyProject extends React.Component {
    // static navigationOptions = {
    // title: 'Welcome'
    // };
    render() {
    return (
    <Text>Hello, Navigation!</Text>
    )
    }
    }

    AppRegistry.registerComponent('MyProject', () => MyProject);

    0_1494238408594_image.png

    0_1494238428625_image.png


登录后回复