{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/1277","labels_url":"https://api.github.com/repos/facebook/react-native/issues/1277/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/1277/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/1277/events","html_url":"https://github.com/facebook/react-native/issues/1277","id":76392808,"number":1277,"title":"[Perf] Small delay displaying RCTRootView after a push","user":{"login":"marcshilling","id":5598961,"avatar_url":"https://avatars.githubusercontent.com/u/5598961?v=3","gravatar_id":"","url":"https://api.github.com/users/marcshilling","html_url":"https://github.com/marcshilling","followers_url":"https://api.github.com/users/marcshilling/followers","following_url":"https://api.github.com/users/marcshilling/following{/other_user}","gists_url":"https://api.github.com/users/marcshilling/gists{/gist_id}","starred_url":"https://api.github.com/users/marcshilling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcshilling/subscriptions","organizations_url":"https://api.github.com/users/marcshilling/orgs","repos_url":"https://api.github.com/users/marcshilling/repos","events_url":"https://api.github.com/users/marcshilling/events{/privacy}","received_events_url":"https://api.github.com/users/marcshilling/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-05-14T15:23:13Z","updated_at":"2015-09-04T01:01:26Z","closed_at":null,"body":"I am attempting to integrate React Native into an existing Objective-C app. My goal is to replace a `UIViewController`'s root `UIView` with an `RCTRootView`. Following these instructions https://facebook.github.io/react-native/docs/embedded-app.html, I am doing the following in `viewDidLoad:` of the view controller:\r\n```\r\nNSURL *jsCodeLocation = [NSURL URLWithString:@\"http://localhost:8081/index.ios.bundle\"];\r\nRCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@\"SimpleApp\" launchOptions:nil];\r\nrootView.frame = self.view.frame;\r\nself.view = rootView;\r\n```\r\n\r\nEverything works fine, except that there is a very small (maybe half second) delay between when the view controller is pushed and the React Native view is actually displayed. I tried pre-bundling the javascript but there was no difference. I can only assume this is because the javascript is loaded asynchronously. Is there anyway to guarantee the view is loaded so that it is immediately seen upon a push transition?\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/137614333","html_url":"https://github.com/facebook/react-native/issues/1277#issuecomment-137614333","issue_url":"https://api.github.com/repos/facebook/react-native/issues/1277","id":137614333,"user":{"login":"dsibiski","id":2922932,"avatar_url":"https://avatars.githubusercontent.com/u/2922932?v=3","gravatar_id":"","url":"https://api.github.com/users/dsibiski","html_url":"https://github.com/dsibiski","followers_url":"https://api.github.com/users/dsibiski/followers","following_url":"https://api.github.com/users/dsibiski/following{/other_user}","gists_url":"https://api.github.com/users/dsibiski/gists{/gist_id}","starred_url":"https://api.github.com/users/dsibiski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsibiski/subscriptions","organizations_url":"https://api.github.com/users/dsibiski/orgs","repos_url":"https://api.github.com/users/dsibiski/repos","events_url":"https://api.github.com/users/dsibiski/events{/privacy}","received_events_url":"https://api.github.com/users/dsibiski/received_events","type":"User","site_admin":false},"created_at":"2015-09-04T01:01:26Z","updated_at":"2015-09-04T01:01:26Z","body":"@idibidiart You're right! I'll try to add some comments around the interesting bits. Good call."}}