{"action":"created","issue":{"url":"https://api.github.com/repos/exponentjs/ex-navigation/issues/213","repository_url":"https://api.github.com/repos/exponentjs/ex-navigation","labels_url":"https://api.github.com/repos/exponentjs/ex-navigation/issues/213/labels{/name}","comments_url":"https://api.github.com/repos/exponentjs/ex-navigation/issues/213/comments","events_url":"https://api.github.com/repos/exponentjs/ex-navigation/issues/213/events","html_url":"https://github.com/exponentjs/ex-navigation/issues/213","id":186335797,"number":213,"title":"this in renderRight undefined, can't bind it","user":{"login":"theobouwman","id":16098190,"avatar_url":"https://avatars.githubusercontent.com/u/16098190?v=3","gravatar_id":"","url":"https://api.github.com/users/theobouwman","html_url":"https://github.com/theobouwman","followers_url":"https://api.github.com/users/theobouwman/followers","following_url":"https://api.github.com/users/theobouwman/following{/other_user}","gists_url":"https://api.github.com/users/theobouwman/gists{/gist_id}","starred_url":"https://api.github.com/users/theobouwman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theobouwman/subscriptions","organizations_url":"https://api.github.com/users/theobouwman/orgs","repos_url":"https://api.github.com/users/theobouwman/repos","events_url":"https://api.github.com/users/theobouwman/events{/privacy}","received_events_url":"https://api.github.com/users/theobouwman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-10-31T16:49:50Z","updated_at":"2016-11-03T17:02:40Z","closed_at":"2016-11-03T17:02:40Z","body":"Hello,\r\n\r\nI want to call a method in my component from within the navigationBar renderRight() function.\r\nBut it says that `this` is undefined.\r\n\r\n\r\n```\r\nexport default class ProductPage extends React.Component {\r\n\r\n    addProduct = () => {\r\n        AppActions.addToList(route.params.product)\r\n        this.props.navigator.showLocalAlert('Hello!', {\r\n            text: {color: '#fff'},\r\n            container: {backgroundColor: 'red'},\r\n        });\r\n    }\r\n\r\n    static route = {\r\n        navigationBar: {\r\n            title: (route, props) => route.product.title,\r\n            renderRight: (route, props) => {\r\n                return (\r\n                    <Entypo style={{margin: 10}} onPress={() => {this.addProduct()}} name=\"plus\" size={32} color=\"black\" />\r\n                );\r\n            }\r\n        }\r\n    }\r\n```\r\nI think that I have to bind `this` to `route` variable. But how?\r\n\r\nThanks for the help.\r\n"},"comment":{"url":"https://api.github.com/repos/exponentjs/ex-navigation/issues/comments/258206395","html_url":"https://github.com/exponentjs/ex-navigation/issues/213#issuecomment-258206395","issue_url":"https://api.github.com/repos/exponentjs/ex-navigation/issues/213","id":258206395,"user":{"login":"theobouwman","id":16098190,"avatar_url":"https://avatars.githubusercontent.com/u/16098190?v=3","gravatar_id":"","url":"https://api.github.com/users/theobouwman","html_url":"https://github.com/theobouwman","followers_url":"https://api.github.com/users/theobouwman/followers","following_url":"https://api.github.com/users/theobouwman/following{/other_user}","gists_url":"https://api.github.com/users/theobouwman/gists{/gist_id}","starred_url":"https://api.github.com/users/theobouwman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theobouwman/subscriptions","organizations_url":"https://api.github.com/users/theobouwman/orgs","repos_url":"https://api.github.com/users/theobouwman/repos","events_url":"https://api.github.com/users/theobouwman/events{/privacy}","received_events_url":"https://api.github.com/users/theobouwman/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T17:02:40Z","updated_at":"2016-11-03T17:02:40Z","body":"Moved to #221 "}}
{"actor":{"display_login":"theobouwman"}}