react-native-mylib
v1.0.2
Published
## Getting started
Readme
react-native-mylib
Getting started
$ npm install react-native-mylib --save
Mostly automatic installation
Better follow manual , do not link twice
`$ react-native link react-native-mylibx
Manual installation
iOS
Very important do all mandatory setup for react-native-vector-icons and react-native-file-picker
- In XCode, in the project navigator, right click
Libraries➜Add Files to [your project's name] - Go to
node_modules➜react-native-myliband addRNMylib.xcodeproj - In XCode, in the project navigator, select your project. Add
libRNMylib.ato your project'sBuild Phases➜Link Binary With Libraries - Run your project (
Cmd+R)<
Android
- Open up
android/app/src/main/java/[...]/MainActivity.java
Add
import com.reactlibrary.RNMylibPackage;to the imports at the top of the fileAdd
import com.oblador.vectoricons.VectorIconsPackage;to the imports at the top of the fileAdd
import com.filepicker.FilePickerPackageto the imports at the top of the fileAdd
new RNMylibPackage()to the list returned by thegetPackages()methodAdd
new FilePickerPackage()to the list returned by thegetPackages()methodAdd
new VectorIconsPackage(),to the list returned by thegetPackages()method
- Append the following lines to
android/settings.gradle:include ':react-native-mylib' project(':react-native-mylib').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mylib/android') include ':react-native-file-picker' project(':react-native-file-picker').projectDir = new File(settingsDir, '../node_modules/react-native-file-picker/android') include ':react-native-vector-icons' project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android') - Insert the following lines inside the dependencies block in
android/app/build.gradle:compile project(':react-native-vector-icons') compile project(':react-native-mylib') compile project(':react-native-file-picker')
Windows
- In Visual Studio add the
RNMylib.slninnode_modules/react-native-mylib/windows/RNMylib.slnfolder to their solution, reference from their app. - Open up your
MainPage.csapp
- Add
using Com.Reactlibrary.RNMylib;to the usings at the top of the file - Add
new RNMylibPackage()to theList<IReactPackage>returned by thePackagesmethod
Usage
import FormView from 'react-native-mylib/lib/formView'
//In your components render pass url where you have your form json
<FormView url = {'url to your json of form'} />
