@wordpress/react-native-bridge Edit

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

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

Top ↑

Manual installation

Top ↑

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

  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

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

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

Top ↑

Contributing to this package

This is an individual package that’s part of the Gutenberg project. The project is organized as a monorepo. It’s made up of multiple self-contained software packages, each with a specific purpose. The packages in this monorepo are published to npm and used by WordPress as well as other software projects.

To find out more about contributing to this package or Gutenberg as a whole, please read the project’s main contributor guide.