1.11.0 • Published 4 years ago
my_first_rn_module_toast v1.11.0
my_first_rn_module_toast
Getting started
$ npm install my_first_rn_module_toast --save
Mostly automatic installation
$ react-native link my_first_rn_module_toast
Manual installation
iOS
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜my_first_rn_module_toast
and addRNMyFirstModule.xcodeproj
- In XCode, in the project navigator, select your project. Add
libRNMyFirstModule.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.RNMyFirstModulePackage;
to the imports at the top of the file - Add
new RNMyFirstModulePackage()
to the list returned by thegetPackages()
method
- Append the following lines to
android/settings.gradle
:include ':my_first_rn_module_toast' project(':my_first_rn_module_toast').projectDir = new File(rootProject.projectDir, '../node_modules/my_first_rn_module_toast/android')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:compile project(':my_first_rn_module_toast')
Usage
import RNMyFirstModule from 'my_first_rn_module_toast';
// TODO: What to do with the module?
RNMyFirstModule;