Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JS load handler. Fix JS run loop sync. Add New Arch flag #1

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sky
Copy link
Owner

@Sky Sky commented Nov 20, 2024

No description provided.

@@ -215,25 +226,30 @@ + (void)waitForReactNativeLoadWithCompletionHandler:(void (^)(void))handler
__block __weak id observer;
__block __weak id observer2;

observer = [[NSNotificationCenter defaultCenter] addObserverForName:@"RCTJavaScriptDidLoadNotification" object:nil queue:nil usingBlock:^(NSNotification * _Nonnull note) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see any reason to wait for RCTJavaScriptDidLoadNotification when in any case we will need to wait for RCTContentDidAppearNotification. Also RCTJavaScriptDidLoadNotification is not emitted on RN 0.76 with New Arch.


handler();
}];
dispatch_async(dispatch_get_main_queue(), ^{
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dispatch_async probably can be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant