Avoid dispatch_async in RCTRootView when bridge has already started

Summary:
There's no good reason for initialProperties to be mutable after the RCTRootView has been created. Passing it in through the constructor means we can skip one dispatch_async.
This commit is contained in:
Pieter De Baets
2015-08-17 04:38:19 -07:00
parent 8460db57bc
commit 261f9434e5
5 changed files with 31 additions and 25 deletions

View File

@@ -30,7 +30,8 @@
launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"UIExplorerApp"];
moduleName:@"UIExplorerApp"
initialProperties:nil];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [[UIViewController alloc] init];