-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
RN 0.74 Bridgeless support #7875
base: master
Are you sure you want to change the base?
Conversation
…idgeless mode. TODO: add full native implementation of turbomodule spec
…ewriting some core classes
Thanks for a great PR! |
@Arkkeeper sure, I'll check this, but it could be a bit buggy (PR is still a draft/PoC, im planning to finish with iOS next week and start android), hope to resolve all the issues |
There is an interesting moment regarding new architecture: RCTEventEmitter fires 'didApper' event before component actually was created (event JS component class constructor was not been called yet). Native call is triggered by viewDidApper lifecycle iOS event when native navigator is ready, but react view is still not, that's why after loading of react view we are getting correct view, but no event about appear status. I think it's because of synchronous nature of new architecture, cause with old architecture we sending events from native before first render, but they emitted in JS only after render. Workaround - |
iOS example app now works fine for both old and new archs (with and without bridge) 🎉 Working on ToDo list right now |
After porting SharedElementTransition example to Reanimated 3 (to support bridgeless), i found that new Reaniamted does not support multiple surfaces yet (one native screen - one surface) To fix this locally, we actually need to change assertion to if branch and return nullptr as result of commit lambda |
…Transition on new architcture with SurfaceHostingView
Looking forward to this one 🎉🎉 |
@TheLonelyAstronaut can you share an update on your progress? |
Bump, looking forward for this. |
@TheLonelyAstronaut Hi, any progress ? If you are busy, can you describe what is left to be done, I could take over. Thanks :) |
@lukutism Hi, no progress yet, i have very complex task on my job right now. You could start Android implementation, I did only iOS things |
any updates here? |
Description
This PR adds support of new stable Bridgeless mode and partial migration from deprecated components. Still need some additional work to make iOS work, but all major issues was resolved with two first commits. To get this work properly, we need to wait this changes in next RN release, that's why RNN bridgeless will only work with RN 0.74.2 and higher (This changes are from Expo team cause they also need such functionality).
What was done
Common:
RNNEventEmitter
andRNNCommandsModule
iOS:
RNNEventEmitter
is a base class now.RNNBridgeEventEmitter
andRNNTurboEventEmitter
are children of this classRNNReactView
was migrated toRCTSurfaceHostingView
(in new architecture mode)RNNAppDelegate
now extendsRCTAppDelegate
RNNAppDelegate
now usesRCTRootViewFactory
andRCTHost
instead ofRCTBridge
(In new architecture mode with bridgeless support)RNNTurboCommandsHandler
as proxy forRNNCommandsHandler
ReactNativeNavigation:bootstrapWithHost:
for bridgeless modeRCTHost
(bridgeless) support for almost all core classes (need some work for SurfaceAnimationController), guarded by preprocessors:TODO
Common:
iOS:
Android: