{"action":"created","issue":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/298","repository_url":"https://api.github.com/repos/wix/react-native-navigation","labels_url":"https://api.github.com/repos/wix/react-native-navigation/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/wix/react-native-navigation/issues/298/comments","events_url":"https://api.github.com/repos/wix/react-native-navigation/issues/298/events","html_url":"https://github.com/wix/react-native-navigation/issues/298","id":176208217,"number":298,"title":"What is the right way for load data before start single view app","user":{"login":"JuoCode","id":3771860,"avatar_url":"https://avatars.githubusercontent.com/u/3771860?v=3","gravatar_id":"","url":"https://api.github.com/users/JuoCode","html_url":"https://github.com/JuoCode","followers_url":"https://api.github.com/users/JuoCode/followers","following_url":"https://api.github.com/users/JuoCode/following{/other_user}","gists_url":"https://api.github.com/users/JuoCode/gists{/gist_id}","starred_url":"https://api.github.com/users/JuoCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuoCode/subscriptions","organizations_url":"https://api.github.com/users/JuoCode/orgs","repos_url":"https://api.github.com/users/JuoCode/repos","events_url":"https://api.github.com/users/JuoCode/events{/privacy}","received_events_url":"https://api.github.com/users/JuoCode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-10T22:49:05Z","updated_at":"2016-09-12T06:20:02Z","closed_at":null,"body":"react-native: 0.32.0\r\nreact-native-navigation: 1.0.30\r\n\r\nI want load data from `AsyncStorage` to determine which screen should pass to `startSingleViewApp`, but   load data operations are asynchronous.\r\n\r\nI have tried in the following way with `react-native@0.31.0`, it's work well:\r\n```\r\nexport default (async () => {\r\n  const user = await AsyncStorage.getItem()\r\n\r\n  let initialScreen\r\n  if (user) {\r\n    initialScreen = { screen: { screen: 'Dashboard' } }\r\n  } else {\r\n    initialScreen = { screen: { screen: 'SignIn' } }\r\n  }\r\n\r\n  Navigation.startSingleViewApp(initialScreen)\r\n})()\r\n```\r\n\r\nWhen i upgrade `react-native` to `0.32.0`, first time is ok, but when i refresh the simulator it will go wrong  as follows:\r\n```\r\nReact-Native: Module AppRegistry is not a registered callable module\r\n```\r\nIs this approach not recommend?\r\nI think this demand should be common, and what is best practices should be like?\r\n\r\nThanks to the open source and community"},"comment":{"url":"https://api.github.com/repos/wix/react-native-navigation/issues/comments/246258809","html_url":"https://github.com/wix/react-native-navigation/issues/298#issuecomment-246258809","issue_url":"https://api.github.com/repos/wix/react-native-navigation/issues/298","id":246258809,"user":{"login":"guyca","id":12352397,"avatar_url":"https://avatars.githubusercontent.com/u/12352397?v=3","gravatar_id":"","url":"https://api.github.com/users/guyca","html_url":"https://github.com/guyca","followers_url":"https://api.github.com/users/guyca/followers","following_url":"https://api.github.com/users/guyca/following{/other_user}","gists_url":"https://api.github.com/users/guyca/gists{/gist_id}","starred_url":"https://api.github.com/users/guyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyca/subscriptions","organizations_url":"https://api.github.com/users/guyca/orgs","repos_url":"https://api.github.com/users/guyca/repos","events_url":"https://api.github.com/users/guyca/events{/privacy}","received_events_url":"https://api.github.com/users/guyca/received_events","type":"User","site_admin":false},"created_at":"2016-09-12T06:20:02Z","updated_at":"2016-09-12T06:20:02Z","body":"Hey @JuoCode \r\nThe approach you took is definitely solid. We don't officially support RN 0.32, the issue doesn't reproduce in RN 0.31?\r\n"}}
{"actor":{"display_login":"guyca"}}