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

feat: remove currentBridge occurences #2120

Open
wants to merge 33 commits into
base: main
Choose a base branch
from

Conversation

WoLewicki
Copy link
Member

Description

PR removing occurences of currentBridge in the code since we should not use it (see software-mansion/react-native-reanimated#5497 (comment)). Now in RNSScreen.mm we use the same hack as ScrollView (see the comment in the code). RNSModule now has the setBridge method so it gets the bridge on new arch in bridgeless too. As for RNSScreenStackHeaderSubview, I removed the call and changed it to nil since it did not work either way on new arch.

Changes

Test code and steps to reproduce

Checklist

RNSScreenViewEvent *event = [[RNSScreenViewEvent alloc] initWithEventName:@"onTransitionProgress"
reactTag:[NSNumber numberWithInt:self.tag]
progress:progress
closing:closing
goingForward:goingForward];
[[RCTBridge currentBridge].eventDispatcher notifyObserversOfEvent:event];
NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:event, @"event", nil];
Copy link
Member Author

Choose a reason for hiding this comment

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

For now it only work on bridgeless mode so we prolly need to find some other way to make it work.

Base automatically changed from @tboba/improve-examples to main May 8, 2024 13:12
@WoLewicki
Copy link
Member Author

We have to wait for facebook/react-native#44474 to be released to properly handle all of this.

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.

None yet

2 participants