Bidirectional communication between native app and multiple React Native mini-apps in a brownfield setup #504
Replies: 1 comment
-
No, it doesn't
One way would be to create a native module that's gonna handle that communication, e.g. backed by some storage so you can hook into the same mechanism from the native and RN app. The easiest way to get started would be to go with a local module with Bob library: https://callstack.github.io/react-native-builder-bob/create#local-library
You can use Notification Center |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone!,
I’m currently using RNEF which uses the brownfield approach to export React Native mini-apps as AAR (Android) and XCFramework (iOS) so they can be integrated into native applications.
The setup works well for loading multiple independent mini-apps inside a larger native app. However, I’m now exploring how to implement bidirectional communication between the native app and each mini-app without having to fully embed RN dependencies on the native host side (especially for iOS).
The scenario:
Android: I can leverage React Native dependencies (already bundled in the mini-app) to use NativeModules/EventEmitters for bidirectional communication.
iOS: I’d like to avoid installing RN dependencies via npm and configuring the entire Xcode project with node_modules from the mini-app. Ideally, the mini-app framework should expose an interface for native ↔ RN communication out-of-the-box.
The goal:
Questions:
Any advice, examples, or best practices would be very appreciated!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions