-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Remove REAInitializerRCTFabricSurface
#6837
base: main
Are you sure you want to change the base?
Conversation
Finally! 😮 |
} | ||
|
||
- (void)attachReactEventListener | ||
- (void)attachReactEventListener:(std::shared_ptr<ReanimatedModuleProxy>)reanimatedModuleProxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (void)attachReactEventListener:(std::shared_ptr<ReanimatedModuleProxy>)reanimatedModuleProxy | |
- (void)attachReactEventListener:(const std::shared_ptr<ReanimatedModuleProxy> &)reanimatedModuleProxy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I can't pass a reference to a pointer because attachReactEventListener
is called with a local pointer. If I pass a reference to smart pointer here and use that reference asynchronously in a block, the pointer will already be destroyed :/
[scheduler addEventListener:eventListener]; | ||
} | ||
auto eventListener = | ||
std::make_shared<facebook::react::EventListener>([reanimatedModuleProxy](const RawEvent &rawEvent) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should pass reanimatedModuleProxy
as std::weak_ptr
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think using a shared pointer should be fine, but just to be safe, we could use a weak_ptr instead 🫡
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are all those other changes done here, are they strictly connected to REAInitializerRCTFabricSurface
removal? Or do they remove the bridge
path completely? Or is there some other reason?
@WoLewicki That PR also drops support for bridge-full mode |
Summary
This PR cleans up the Reanimated initialization process for iOS on Fabric. The primary motivation for these changes is to remove
REAInitializerRCTFabricSurface
, which was used as a workaround to access the surface presenter on the new architecture in bridge-full mode.Test plan
I need to wait until the reload issue is fixed on the main branch 😞