links: React Native MOC
Android setup
-
Create a
build.gradlefile atlinear-gradient-component/android -
Create
AndroidManifest.xmlatlinear-gradient-component/android/src/main/ -
Create the Fabric Component View. at
linear-gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientView.javaThis just extends a native AndroidView -
Create the component manager at
linear-gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientViewManager.javaThis file holds the view instance and the react props -
Create the component package at
linear-gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientViewPackage.javaThis exports the view managers and native modules to JS side -
Setup codegen in
linear-gradient-component/android/build.gradle
Problems
- Every time any fabric component or turbo module is reinstalled the whole dependency has to be built. It took around 45 minutes to just build hermes
tags: fabric
sources: RNNewArchitectureLibrary