{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/9214","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/9214/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/9214/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/9214/events","html_url":"https://github.com/facebook/react-native/issues/9214","id":169401302,"number":9214,"title":"NavigationExperimental is missing willfocus and didfocus events","user":{"login":"ng-marcus","id":20163757,"avatar_url":"https://avatars.githubusercontent.com/u/20163757?v=3","gravatar_id":"","url":"https://api.github.com/users/ng-marcus","html_url":"https://github.com/ng-marcus","followers_url":"https://api.github.com/users/ng-marcus/followers","following_url":"https://api.github.com/users/ng-marcus/following{/other_user}","gists_url":"https://api.github.com/users/ng-marcus/gists{/gist_id}","starred_url":"https://api.github.com/users/ng-marcus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ng-marcus/subscriptions","organizations_url":"https://api.github.com/users/ng-marcus/orgs","repos_url":"https://api.github.com/users/ng-marcus/repos","events_url":"https://api.github.com/users/ng-marcus/events{/privacy}","received_events_url":"https://api.github.com/users/ng-marcus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-04T15:21:32Z","updated_at":"2016-08-04T15:33:06Z","closed_at":null,"body":"Using React 0.31 branch NavigationExperimental is working well, but it seems to be missing some lifecycle events.\r\n\r\nIn particular, I need to know when the transition between scenes has finished, as componentDidMount is called at the start of the transition, and I want to display a modal and do some compute intensive work once the transition has completed.   \r\n\r\nThe old Navigator has willFocus and didFocus events.\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/237590606","html_url":"https://github.com/facebook/react-native/issues/9214#issuecomment-237590606","issue_url":"https://api.github.com/repos/facebook/react-native/issues/9214","id":237590606,"user":{"login":"ryankask","id":81891,"avatar_url":"https://avatars.githubusercontent.com/u/81891?v=3","gravatar_id":"","url":"https://api.github.com/users/ryankask","html_url":"https://github.com/ryankask","followers_url":"https://api.github.com/users/ryankask/followers","following_url":"https://api.github.com/users/ryankask/following{/other_user}","gists_url":"https://api.github.com/users/ryankask/gists{/gist_id}","starred_url":"https://api.github.com/users/ryankask/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryankask/subscriptions","organizations_url":"https://api.github.com/users/ryankask/orgs","repos_url":"https://api.github.com/users/ryankask/repos","events_url":"https://api.github.com/users/ryankask/events{/privacy}","received_events_url":"https://api.github.com/users/ryankask/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T15:33:05Z","updated_at":"2016-08-04T15:33:05Z","body":"The events you're looking for are available on `NavigationTransitioner`: https://github.com/facebook/react-native/blob/0.31-stable/Libraries/NavigationExperimental/NavigationTransitioner.js#L37\r\n\r\nThey are `onTransitionStart` and `onTransitionEnd`. Are you using `NavigationCardStack`? Those props aren't exposed on that component. I've seen a few issues about that so perhaps they should. It would be a simple feature to add.\r\n\r\nIf you're mainly looking to do some expensive work after the transition has happened, you can use `InteractionManager.runAfterInteractions` in `componentDidMount` (https://facebook.github.io/react-native/docs/interactionmanager.html).\r\n\r\nThere's some more information here: https://facebook.github.io/react-native/docs/performance.html#slow-navigator-transitions\r\n\r\nDoes this help?\r\n"}}
{"actor":{"display_login":"ryankask"}}