1.0.0 • Published 3 months ago
react-native-race-car-training v1.0.0
react-native-race-car-training
Getting started
$ npm install react-native-race-car-training --save
Mostly automatic installation
$ react-native link react-native-race-car-training
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-race-car-training
and addRNRaceCarTraining.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNRaceCarTraining.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.RNRaceCarTrainingPackage;
to the imports at the top of the file - Add
new RNRaceCarTrainingPackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':react-native-race-car-training' project(':react-native-race-car-training').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-race-car-training/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':react-native-race-car-training')
Windows
- In Visual Studio add the
RNRaceCarTraining.sln
innode_modules/react-native-race-car-training/windows/RNRaceCarTraining.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using Race.Car.Training.RNRaceCarTraining;
to the usings at the top of the file - Add
new RNRaceCarTrainingPackage()
to theList<IReactPackage>
returned by thePackages
method
Usage
import RNRaceCarTraining from 'react-native-race-car-training';
// TODO: What to do with the module?
RNRaceCarTraining;
1.0.0
3 months ago