A manager to share an
RCTBridge across the application. The shared bridge manager is responsible for injecting the React Native bundle and creating
RCTRooViewss which rendering React Native components and can be used as a root view of a
This project is currently in beta.
Core APIs are subject to change. We encourage people to try this library out and provide us feedback as we get it to a stable state.
$ npm install react-native-shared-bridge --save
Mostly automatic installation
$ react-native link react-native-shared-bridge
- In XCode, in the project navigator, right click
Add Files to [your project's name]
- Go to
- In XCode, in the project navigator, select your project. Add
libMSRSharedBridge.ato your project's
Link Binary With Libraries
- Run your project (
- Open up
import net.mischneider.MSRSharedBridgePackage;to the imports at the top of the file
new MSRSharedBridgePackage()to the list returned by the
- Append the following lines to
include ':react-native-shared-bridge' project(':react-native-shared-bridge').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-shared-bridge/android')
- Insert the following lines inside the dependencies block in
The following example shows how to use
MSRSharedBaridge to create root views for a
MSRReactNativeViewController which is responsible for showing a React Native component.
Copyright 2018 Michael Schneider
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.