{"action":"created","issue":{"url":"https://api.github.com/repos/yamill/react-native-orientation/issues/116","repository_url":"https://api.github.com/repos/yamill/react-native-orientation","labels_url":"https://api.github.com/repos/yamill/react-native-orientation/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/yamill/react-native-orientation/issues/116/comments","events_url":"https://api.github.com/repos/yamill/react-native-orientation/issues/116/events","html_url":"https://github.com/yamill/react-native-orientation/issues/116","id":188343517,"number":116,"title":"Cannot read property '...' of undefined","user":{"login":"julesmoretti","id":744300,"avatar_url":"https://avatars.githubusercontent.com/u/744300?v=3","gravatar_id":"","url":"https://api.github.com/users/julesmoretti","html_url":"https://github.com/julesmoretti","followers_url":"https://api.github.com/users/julesmoretti/followers","following_url":"https://api.github.com/users/julesmoretti/following{/other_user}","gists_url":"https://api.github.com/users/julesmoretti/gists{/gist_id}","starred_url":"https://api.github.com/users/julesmoretti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julesmoretti/subscriptions","organizations_url":"https://api.github.com/users/julesmoretti/orgs","repos_url":"https://api.github.com/users/julesmoretti/repos","events_url":"https://api.github.com/users/julesmoretti/events{/privacy}","received_events_url":"https://api.github.com/users/julesmoretti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-09T20:23:28Z","updated_at":"2016-12-15T14:12:38Z","closed_at":null,"body":"* Added module using npm i...\r\n* Linked file\r\n* Checked cradle files and so on from the readme\r\n* Can console.log Orientation in my componentdidmount() which returns all the functions\r\n\r\nBut when right bellow I try Orientation.unlockAllOrientations() or .getInitialOrientation() I get `Cannot read property '...' of undefined`...\r\n\r\nWhat am I missing?\r\n\r\n```\r\nimport React, {Component} from 'react';\r\nimport {View, Text, StyleSheet, Image, TouchableHighlight} from 'react-native';\r\n\r\nlet Orientation = require('react-native-orientation');\r\n\r\nexport class App extends Component {\r\n\r\n\tconstructor(props) {\r\n\t\tsuper(props);\r\n\t}\r\n\r\n\tcomponentDidMount() {\r\n\t\tconsole.log(\"App component Mounted\", Orientation);\r\n\t\t// Orientation.lockToPortrait();\r\n\t\t// Orientation.addOrientationListener(this._orientationDidChange);\r\n\t\t// Orientation.addOrientationListener(()=>{console.log(\"It changed\")});\r\n\t\tOrientation.unlockAllOrientations(); // ==> error\r\n\t\tOrientation.addOrientationListener((orientation) => {\r\n\t\t\tconsole.log('orientation changed', orientation);\r\n\t\t}); // ==> does not return anything when device is rotated using emulator\r\n\t}\r\n...\r\n```\r\n\r\nthank you."},"comment":{"url":"https://api.github.com/repos/yamill/react-native-orientation/issues/comments/267336639","html_url":"https://github.com/yamill/react-native-orientation/issues/116#issuecomment-267336639","issue_url":"https://api.github.com/repos/yamill/react-native-orientation/issues/116","id":267336639,"user":{"login":"kiszadr","id":22788847,"avatar_url":"https://avatars.githubusercontent.com/u/22788847?v=3","gravatar_id":"","url":"https://api.github.com/users/kiszadr","html_url":"https://github.com/kiszadr","followers_url":"https://api.github.com/users/kiszadr/followers","following_url":"https://api.github.com/users/kiszadr/following{/other_user}","gists_url":"https://api.github.com/users/kiszadr/gists{/gist_id}","starred_url":"https://api.github.com/users/kiszadr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kiszadr/subscriptions","organizations_url":"https://api.github.com/users/kiszadr/orgs","repos_url":"https://api.github.com/users/kiszadr/repos","events_url":"https://api.github.com/users/kiszadr/events{/privacy}","received_events_url":"https://api.github.com/users/kiszadr/received_events","type":"User","site_admin":false},"created_at":"2016-12-15T14:12:38Z","updated_at":"2016-12-15T14:12:38Z","body":"I have the same issue."}}
{"actor":{"display_login":"kiszadr"}}