react-native-my-fancy-lib
v1.0.1
Published
## Getting started
Downloads
7
Readme
react-native-my-fancy-lib
Getting started
$ npm install react-native-my-fancy-lib --save
Mostly automatic installation
$ react-native link react-native-my-fancy-lib
Manual installation
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNMyFancyLibPackage;
to the imports at the top of the file - Add
new RNMyFancyLibPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-my-fancy-lib' project(':react-native-my-fancy-lib').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-my-fancy-lib/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-my-fancy-lib')
Usage
import RNMyFancyLib from 'react-native-my-fancy-lib';
// TODO: What to do with the module?
RNMyFancyLib;