1.0.2 • Published 5 years ago

react-native-wrathys-lib-demo v1.0.2

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

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);