This is a test inHouse component. For now....
There are many ways to do this, here's the way I do it:
-
Do
npm install git+https://github.com/flaviotobi/react-native-tactics-creator.git --savein your main project. -
Link the library:
Automatic:
react-native link react-native-tactics-creatorManual:
-
Add the following to
android/settings.gradle:include ':react-native-tactics-creator' project(':react-native-tactics-creator').projectDir = new File(settingsDir, '../node_modules/react-native-tactics-creator/android') -
Add the following to
android/app/build.gradle:... dependencies { ... compile project(':react-native-tactics-creator') } -
Add the following to
android/app/src/main/java/**/MainApplication.java:import com.tactical.creator.TacticalCreatorPackage; // add this for react-native-android-library-boilerplate public class MainApplication extends Application implements ReactApplication { @Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage(), new TacticalCreatorPackage() // add this for react-native-android-library-boilerplate ); } }
-
-
Simply
import/requireit by the name defined in your library'spackage.json:import TacticsCreator from 'react-native-tactics-creator' <TacticsCreator />