/react-native-template-new-architecture

React Native 0.70.1 ⚡ M1/2, Ubuntu 💻 Hermes ⚙️ Fabric 🚄 Turbo Modules 💨 TypeScript 4.9b ✅ Gradle 7.5, JDK 18+, NDK 25, CMake 📓 Storybook 6b +addons 🍎 Xcode 14.1b, Monterey 13b 🧩 Yarn 3.2 (4 🚧) ESLint 🧹 Prettier ✨ Metro 📦 Re.Pack 🚧 Bazel, Buck2 🚧 Babel 🗼 SWC 🚧 cljs 🚧 GitHub Actions ✔️ libs 📚 for curious early adopters :suspect:

Primary LanguageJava

React Native Template / Boilerplate

Bleeding 🔪 Edge 🌉 Nightlymare 🌃 Edition

““”̿ ̿ ̿ ̿ ̿’̿’̵͇̿̿з=(*▽*)=ε/̵͇̿̿/̿ ̿ ̿ ̿ ̿’““
IDKFA

NPM RN pkg ver TypeScript Linter Formatter: prettier CI Maintenance Docs Project

Android iOS
Android iOS

Setup

Fresh M1/M2

Yarn v3

Upgrading from classic v1

cd ~
yarn set version berry

canary v4 🚧

Install

yarn # 🍺 version
yarn setup # 🤖 versioned version 

https://github.com/leotm/react-native-template-new-architecture/blob/849ac8ff8512edbf51f580b4e85277456566a034/package.json#L146

More

Start

yarn start

Silicon (M1/M2) Macs

iOS (arm64)

cd ios
pod install
..
yarn ios

Or iOS (Intel x86_64)

Android

NDK

Fat M1 components: ndk-build, LLVM, CMake, Make, Python, Ninja, shader-tools, simpleperf - yasm remaining

Setup

Building-from-source#prerequisites, but with NDK 25.0.8775105

# android/local.properties
sdk.dir=/Users/<user>/Library/Android/sdk
ndk.dir=/Users/<user>/Library/Android/sdk/ndk/25.0.8775105

Strip: rcX suffix / (trailing) spaces / final final linebreak - otherwise fcntl(): Bad file descriptor

Android Studio

Setup

Open Android Studio - Preview release - Canary build

yarn android --active-arch-only

Troubleshooting

Storybook v6 beta

https://github.com/leotm/react-native-template-new-architecture/blob/01f1c9864f55367004effbe26d3f33590784704b/src/index.tsx#L132

Soon: v6 rn storybook server

Storybook v5

https://github.com/leotm/react-native-template-new-architecture/blob/01f1c9864f55367004effbe26d3f33590784704b/metro.config.js#L16

# @storybook/react-native-server v5
yarn storybook
yarn <android/ios>

Node

With ts-node and curveball

yarn server

Deno

brew install deno
yarn deno

License: MIT