$ npm install @builder.io/react-native --save
$ react-native link @builder.io/react-native
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜@builder.io/react-native
and addRNReactNative.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNReactNative.a
to your project'sBuild Phases
➜Link Binary With Libraries
- Run your project (
Cmd+R
)<
- Open up
android/app/src/main/java/[...]/MainActivity.java
- Add
import com.reactlibrary.RNReactNativePackage;
to the imports at the top of the file - Add
new RNReactNativePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':@builder.io/react-native' project(':@builder.io/react-native').projectDir = new File(rootProject.projectDir, '../node_modules/@builder.io/react-native/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':@builder.io/react-native')
- In Visual Studio add the
RNReactNative.sln
innode_modules/@builder.io/react-native/windows/RNReactNative.sln
folder to their solution, reference from their app. - Open up your
MainPage.cs
app
- Add
using React.Native.RNReactNative;
to the usings at the top of the file - Add
new RNReactNativePackage()
to theList<IReactPackage>
returned by thePackages
method
import RNReactNative from '@builder.io/react-native';
// TODO: What to do with the module?
RNReactNative;