• Stars
    star
    201
  • Rank 194,491 (Top 4 %)
  • Language
  • License
    MIT License
  • Created almost 3 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A collection of sample React Native Apps that will show you how to use the New Architecture (Fabric & TurboModules) step-by-step.

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 name Description Android iOS
run/from-0.67-to-0.69 A full migration from RN 0.67 to 0.69
run/from-0.67-to-0.70 A full migration from RN 0.67 to 0.70
run/pure-cxx-module A step-by-step guide on how to integrate a Pure C++ module in a React Native 0.71.0-RC.2 app. Thanks to @christophpurrer for the guide
view-flattening-ios Examples of View Flattening on iOS

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 name Description Android iOS
run/android/0.68.0-rc2 A run from an empty project on RN 0.68.0-rc2 using the New Architecture template
run/android/20220202 A 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-rc3 A run from an empty project on RN 0.68.0-rc3 using the New Architecture template
ios/20220309 A 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.68 A full migration from RN 0.67 to 0.68
run/ios/0.68.0-rc.4-typescript A migration from RN 0.67 to RN 0.68 with typescript suppport for iOS
run/android/0.68.0-rc.4-typescript A migration from RN 0.67 to RN 0.68 with typescript suppport for Android

More Repositories

1

upgrade-helper

⚛️ A web tool to support React Native developers in upgrading their apps.
TypeScript
3,628
star
2

hooks

React Native APIs turned into React Hooks for use in functional React components
TypeScript
3,451
star
3

cli

The React Native Community CLI - command line tools to help you build RN apps
TypeScript
2,374
star
4

react-native-template-typescript

👾 Clean and minimalist React Native template for a quick start with TypeScript.
Java
1,858
star
5

discussions-and-proposals

Discussions and proposals related to the main React Native project
1,684
star
6

releases

React Native releases
JavaScript
1,501
star
7

rn-diff-purge

Easier React Native upgrades by clearly exposing changes from a version to another. 🚀 And what better way than to purge, init, then diff? Spoiler: there's no better way. 😎
Shell
1,266
star
8

jsc-android-buildscripts

Script for building JavaScriptCore for Android (for React Native but not only)
JavaScript
1,056
star
9

directory

A searchable and filterable directory of React Native libraries.
TypeScript
1,003
star
10

docker-android

Android Docker Image for React Native and common android development.
Dockerfile
473
star
11

RNNewArchitectureLibraries

A collection of sample React Native Libraries that will show you how to use the New Architecture (Fabric & TurboModules) step-by-step.
322
star
12

upgrade-support

A central community-backed place to request and give help when upgrading your app.
JavaScript
254
star
13

react-native-circleci-orb

A CircleCI Orb to Simplify Testing your React Native App
174
star
14

hermes-profile-transformer

TypeScript tool for converting Hermes Sampling Profiler output to Chrome Dev Tools format
TypeScript
86
star
15

boost-for-react-native

The Boost C++ library source code used to build React Native from source
C++
86
star
16

template

The React Native Community Template - getting started building RN apps for Android & iOS
JavaScript
46
star
17

eslint-plugin-react-native-globals

ESLint Environment for React Native
JavaScript
38
star
18

reproducer-react-native

A reproducer to easily recreate bugs and report problems for React Native
TypeScript
32
star
19

developer-experience-wg

Discussions-only repo for topics around React Developer Experience
18
star
20

rn-diff-lib-purge

Easier React Native library upgrades by clearly exposing changes from a version to another. 🚀 And what better way than to purge, init, then diff? Spoiler: there's no better way. 😎
Shell
3
star