From 981e953d45ff440bf4dde6bc24100a41822e53ec Mon Sep 17 00:00:00 2001 From: Tieme van Veen Date: Mon, 9 Jul 2018 17:02:33 +0200 Subject: [PATCH] Reproduce bug --- App.js | 8 +++++--- .../AppDelegate.m | 5 ++++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/App.js b/App.js index 171d0f0..8604e53 100644 --- a/App.js +++ b/App.js @@ -16,14 +16,16 @@ const instructions = Platform.select({ 'Shake or press menu button for dev menu', }); -type Props = {}; +type Props = { + foo: String +}; export default class App extends Component { render() { return ( Welcome to React Native! - To get started, edit App.js - {instructions} + The next line should read "qux", if it reads "bar" the view was not re-rendered after `rootView.appProperties` was changed.. + "{this.props.foo}" ); } diff --git a/ios/AppPropertiesNoReRenderWhileBridgeIsLoading/AppDelegate.m b/ios/AppPropertiesNoReRenderWhileBridgeIsLoading/AppDelegate.m index c61987e..5836d53 100644 --- a/ios/AppPropertiesNoReRenderWhileBridgeIsLoading/AppDelegate.m +++ b/ios/AppPropertiesNoReRenderWhileBridgeIsLoading/AppDelegate.m @@ -20,8 +20,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"AppPropertiesNoReRenderWhileBridgeIsLoading" - initialProperties:nil + initialProperties:@{@"foo" : @"bar"} launchOptions:launchOptions]; + + rootView.appProperties = @{@"foo" : @"qux"}; + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];