Please read Integration with Existing Apps for React Native.
Basic idea: we will be working on React Native (RN) components and native teams will implement our components using native methods. We should be moving forward to the completely RN application and native code should implement only really platform specific requirements (with unified JS interface).
Things to be solved:
- production bundle distribution for iOS and Android (private NPM?)
- ...
Installation
yarn add native-connected
yarn outdated
yarn upgrade native-connected
yarn info native-connected
yarn postinstall (?)
Available components:
native-connected
- basic example PoC component- ...
Example usage
Swift
import React
final class ReactNativeViewController {
override func loadView() {
self.view = RCTRootView(
bundleURL: URL(fileURLWithPath: "path to the /bundle/index.ios.js"),
moduleName: "native-connected",
initialProperties: nil,
launchOptions: nil
)
}
}