0.1.0 • Published 1 year ago

chirography-optimizer v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

React Native New Architecture Sample

This repo contains several branches that will help you understand how to setup your project for the React Native New Architecture. This should considered as a support material of the official migration guide.

Here you will find runs of the migration guide on empty projects. Every commit is documented and allows to follow over on every step.

Some branches also have a RUN.md (example: ios/20220309) file that can help you follow the commits with additional context.

Please find a list of the branches below, with more information on which kind of setup they're addressing.

Branches

Branch nameDescriptionAndroidiOS
run/android/20220202A run from an empty project on RN 0.67.2, migrated to run on a RN nightly version 0.0.0-20211205-2008-583471bc4. Here you can see all the step-by-step migration needed for an app coming from RN 0.67
run/android/0.68.0-rc3A run from an empty project on RN 0.68.0-rc3 using the New Architecture template
ios/20220309A run from an empty project starting from 0.67.3 to an app with a Turbomodule and a Fabric component
run/from-0.67-to-0.68A full migration from RN 0.67 to 0.68
run/ios/0.68.0-rc.4-typescriptA migration from RN 0.67 to RN 0.68 with typescript suppport for iOS
run/android/0.68.0-rc.4-typescriptA migration from RN 0.67 to RN 0.68 with typescript suppport for Android
run/from-0.67-to-0.69A full migration from RN 0.67 to 0.69
run/from-0.67-to-0.70A full migration from RN 0.67 to 0.70

Sample Run

A sample run will have commits marked as [TurboModule] or [Fabric] to clarify which aspect of the New Architecture is involved. For example, for the run/android/20220202 branch will look like the following:

  • 582a8a7 [Fabric] Use the new Fabric custom component
  • adeee8b [Fabric] Register the MainComponentsRegistry
  • 5e7d88f [Fabric] Add a MainComponentsRegistry for the application
  • 8afa19e [Fabric] Add a React Package that will load the ViewManager
  • c893370 [Fabric] Create the corresponding ViewManager
  • 32885f5 [Fabric] Create a custom component spec file
  • 5408f18 [Fabric] call setIsFabric(true) in the MainActivity
  • 20a8378 [Fabric] Provide the JSI Module Package
  • cf1378e [TurboModule] Let's try to use this TurboModule
  • a80cea1 [TurboModule] Enable TurboModule system in the Android App
  • d8884c2 [TurboModule] Add the C++ implementation for MainApplicationTurboModuleManagerDelegate
  • f6d2e81 [TurboModule] Register a new TurboModulePackage
  • 7ae59dd [TurboModule] Install the ReactPackageTurboModuleManagerDelegateBuilder
  • 4dfcfa6 [TurboModule] Setup the NDK Build for the Android app
  • a0cf888 [TurboModule] Implement the generated native spec interface
  • ba3f2a4 [TurboModule] Configure the codegen with libraryname and Java package
  • 7da902f [TurboModule] Add a NativeModule Spec file
  • cb0eceb Setup the React Gradle Plugin
  • 66ca29b Build React Native from Source
  • be102a1 Enable Hermes
  • 4357af9 Bump React Native to a nightly version
  • a3866a1 Result of npx react-native init

Older Branches

Here we collect older branches that are working, but no longer relevant.

Branch nameDescriptionAndroidiOS
run/android/0.68.0-rc2A run from an empty project on RN 0.68.0-rc2 using the New Architecture template