@wordpress/react-native-bridge Edit

Getting started Getting started

This package is not yet published to npm. You can use it locally:

$ npm install ./gutenberg/packages/react-native-bridge --save

Top ↑

Mostly automatic installation Mostly automatic installation

$ react-native link @wordpress/react-native-bridge

Top ↑

Manual installation Manual installation

Top ↑

iOS iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-bridge and add RNReactNativeGutenbergBridge.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNReactNativeGutenbergBridge.a to your project’s Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Top ↑

Android Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNReactNativeGutenbergBridgePackage; to the imports at the top of the file
  • Add new RNReactNativeGutenbergBridgePackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':@wordpress_react-native-bridge'
    project(':@wordpress_react-native-bridge').projectDir = new File(rootProject.projectDir, './gutenberg/packages/react-native-bridge/android')
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
    implementation project(':@wordpress_react-native-bridge')

Top ↑

Usage Usage

import RNReactNativeGutenbergBridge from '@wordpress/react-native-bridge';

// TODO: What to do with the module?
RNReactNativeGutenbergBridge;