links: React Native MOC


Android setup

  1. Create a build.gradle file at linear-gradient-component/android

  2. Create AndroidManifest.xml at linear-gradient-component/android/src/main/

  3. Create the Fabric Component View. at linear-gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientView.java

     This just extends a native AndroidView
    
  4. Create the component manager at linear-gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientViewManager.java

     This file holds the view instance and the react props
    
  5. Create the component package at linear-gradient-component/android/src/main/java/com/fyndx/LinearGradient/LinearGradientViewPackage.java

         This exports the view managers and native modules to JS side
    
  6. Setup codegen in linear-gradient-component/android/build.gradle

Problems

  1. 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