{"action":"opened","issue":{"url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3600","repository_url":"https://api.github.com/repos/react-navigation/react-navigation","labels_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3600/labels{/name}","comments_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3600/comments","events_url":"https://api.github.com/repos/react-navigation/react-navigation/issues/3600/events","html_url":"https://github.com/react-navigation/react-navigation/issues/3600","id":300035756,"number":3600,"title":"TypeError:Cannot read property 'navigate' of undefined","user":{"login":"SwainZhang","id":22322315,"avatar_url":"https://avatars2.githubusercontent.com/u/22322315?v=4","gravatar_id":"","url":"https://api.github.com/users/SwainZhang","html_url":"https://github.com/SwainZhang","followers_url":"https://api.github.com/users/SwainZhang/followers","following_url":"https://api.github.com/users/SwainZhang/following{/other_user}","gists_url":"https://api.github.com/users/SwainZhang/gists{/gist_id}","starred_url":"https://api.github.com/users/SwainZhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SwainZhang/subscriptions","organizations_url":"https://api.github.com/users/SwainZhang/orgs","repos_url":"https://api.github.com/users/SwainZhang/repos","events_url":"https://api.github.com/users/SwainZhang/events{/privacy}","received_events_url":"https://api.github.com/users/SwainZhang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-25T15:38:45Z","updated_at":"2018-02-25T15:38:45Z","closed_at":null,"author_association":"NONE","body":"\r\n![image](https://user-images.githubusercontent.com/22322315/36643285-435b4b9c-1a84-11e8-94a7-98dd0442a7db.png)\r\n\r\n```\r\nexport const Navigator = StackNavigator({\r\n    Home: {\r\n        screen: HomePage,\r\n        navigationOptions:{\r\n            header:null\r\n        }\r\n    },\r\n    Mine:{\r\n        screen : MinePage,\r\n        navigationOptions:{\r\n            header:null\r\n        }\r\n\r\n    },\r\n    Custom:{\r\n        screen:CustomeKey,\r\n        navigationOptions:{\r\n            header:null\r\n        }\r\n    }\r\n\r\n});\r\n```\r\n```\r\nimport React,{Component} from 'react';\r\nimport {\r\n\r\n    StyleSheet,\r\n    View,\r\n    Text,\r\n   \r\n} from 'react-native';\r\nimport NavigationBar from '../component/NavigationBar';\r\n\r\n\r\nexport default class MinePage extends Component{\r\n\r\n    render(){\r\n        const {navigate} = this.props.navigation;\r\n        return (<View style={styles.container}>\r\n            <NavigationBar title='我的'/>\r\n            <View style={{flexDirection:'column',alignItems:'center',marginTop:30}}>\r\n                <Text style={{fontSize:30,backgroundColor:'orange'}} onPress={()=>{navigate('Custom')}}>自定义分类</Text>\r\n            </View>\r\n        </View>)\r\n    }\r\n}\r\n\r\nconst styles=StyleSheet.create({\r\n    container:{\r\n        flex:1,\r\n        backgroundColor:\"#f00\"\r\n    }\r\n});\r\n```\r\n\r\n### My Environment\r\n\r\n| software         | version\r\n| ---------------- | -------\r\n| react-navigation |^1.1.2\r\n| react-native     |0.53.3\r\n| node             |v6.9.2\r\n| npm or yarn      |npm 3.10.9\r\n"}}
{"actor":{"display_login":"SwainZhang"}}