npm.io
1.0.2 • Published 7 years ago

react-native-wrathys-lib-demo

Licence
MIT
Version
1.0.2
Deps
0
Size
1.0 MB
Vulns
0
Weekly
0

react-native-wrathys-lib-demo

Getting started

$ npm install react-native-wrathys-lib-demo --save

Mostly automatic installation

$ react-native link react-native-wrathys-lib-demo

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

Usage

import RNWrathysLibDemo from 'react-native-wrathys-lib-demo';

RNWrathysLibDemo.show("Test toast", RNWrathysLibDemo.SHORT);
// or
RNWrathysLibDemo.show("Test toast", RNWrathysLibDemo.LONG);

Keywords