1.0.0 • Published 7 years ago
react-native-form-view v1.0.0
react-native-form-view
Getting started
$ npm install react-native-form-view --save
Mostly automatic installation
$ react-native link react-native-form-view
Better follow manual & do not use link twice
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-form-view
and addRNFormView.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNFormView.a
to 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.RNFormViewPackage;
to the imports at the top of the file - Add
import com.oblador.vectoricons.VectorIconsPackage;
to the imports at the top of the file Add
import com.filepicker.FilePickerPackage
to the imports at the top of the fileAdd
new RNFormViewPackage()
to the list returned by thegetPackages()
method- Add
new FilePickerPackage()
to the list returned by thegetPackages()
method - Add
new VectorIconsPackage(),
to the list returned by thegetPackages()
method
Append the following lines to
android/settings.gradle
:include ':react-native-form-view' project(':react-native-form-view').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-form-view/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-form-view') compile project(':react-native-mylib') compile project(':react-native-file-picker')
Windows
- In Visual Studio add the
RNFormView.sln
innode_modules/react-native-form-view/windows/RNFormView.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Com.Reactlibrary.RNFormView;
to the usings at the top of the file - Add
new RNFormViewPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import FormView from 'react-native-form-view/lib/formView';
//In your components render pass url where you have your form json
<FormView url = {'url to your json of form'} />
1.0.0
7 years ago