raininfall / react-native-x5

Tencent X5 browser wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-x5

Getting started

$ npm install raininfall/react-native-x5 --save

Mostly automatic installation

$ react-native link react-native-x5

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import github.raininfall.react.x5.RNX5Package; to the imports at the top of the file
  • Add new RNX5Package() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-x5'
    project(':react-native-x5').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-x5/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-x5')
    

Usage

import RNX5 from 'react-native-x5';

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

About

Tencent X5 browser wrapper


Languages

Language:Java 80.7%Language:JavaScript 19.3%