Skip to content

Commit 2a1d10d

Browse files
committed
fix: RCTReactViewController properly check props to update
1 parent 45fcce8 commit 2a1d10d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

packages/react-native/Libraries/SwiftExtensions/RCTReactViewController.m

+5-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ - (void)tapGesture:(UITapGestureRecognizer*)recognizer {
6161

6262
- (void)updateProps:(NSDictionary *)newProps {
6363
RCTRootView *rootView = (RCTRootView *)self.view;
64-
if (![rootView.appProperties isEqualToDictionary:newProps]) {
64+
if (rootView.appProperties == newProps) {
65+
return;
66+
}
67+
68+
if (newProps != nil && ![rootView.appProperties isEqualToDictionary:newProps]) {
6569
[rootView setAppProperties:newProps];
6670
}
6771
}
68-
6972
@end

packages/react-native/Libraries/WindowManager/WindowManager.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export interface WindowStatic {
22
id: String;
3-
open (props: Object): Promise<void>;
3+
open (props?: Object): Promise<void>;
44
update (props: Object): Promise<void>;
55
close (): Promise<void>;
66
}

0 commit comments

Comments
 (0)