Skip to content

Commit

Permalink
fix: RCTReactViewController properly check props to update
Browse files Browse the repository at this point in the history
  • Loading branch information
okwasniewski committed Feb 26, 2024
1 parent 45fcce8 commit 2a1d10d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ - (void)tapGesture:(UITapGestureRecognizer*)recognizer {

- (void)updateProps:(NSDictionary *)newProps {
RCTRootView *rootView = (RCTRootView *)self.view;
if (![rootView.appProperties isEqualToDictionary:newProps]) {
if (rootView.appProperties == newProps) {
return;
}

if (newProps != nil && ![rootView.appProperties isEqualToDictionary:newProps]) {
[rootView setAppProperties:newProps];
}
}

@end
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface WindowStatic {
id: String;
open (props: Object): Promise<void>;
open (props?: Object): Promise<void>;
update (props: Object): Promise<void>;
close (): Promise<void>;
}
Expand Down

0 comments on commit 2a1d10d

Please sign in to comment.