/react-native-template-new-architecture

React Native 0.69 ⚡ M1, Ubuntu 💻 Hermes ⚙️ Fabric 🚄 Turbo Modules 💨 TypeScript 4.8b ✔️ Gradle 7.4, JDK 17, NDK 25, ndk-build (CMake 🚧) 📓 Storybook 6a +addons 🍎 Xcode 14b, Monterey 12.5b 🧩 Yarn 3.2 (Turborepo 🚧) ESLint ✔️ Prettier ✨ Metro 📦 Re.Pack 🚧 Bazel, Buck 🚧 Babel 🗼 SWC 🚧 cljs 🚧 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

Setup

Fresh M1

Yarn

yarn set version berry # Globally, outside repo
yarn set version canary # Bonus, to keep up w Renovate bot

Install

yarn
yarn setup # If bonus n/a

Start

yarn start

Silicon (M1) Macs

iOS (arm64)

cd ios
pod install
..
yarn ios

Or iOS (Intel x86_64)

Android

Building-from-source#prerequisites, but with NDK 25.0.8528842 rc4

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

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

Open Android Studio - Preview release - Canary build

yarn android --active-arch-only

Troubleshooting

Storybook v6 alpha

src/index.tsx

- export default false ? StorybookUIRoot : App 
+ export default true ? StorybookUIRoot : App 

Soon: v6 rn storybook server

Storybook v5

metro.config.js

-       inlineRequires: true
+       inlineRequires: false
# https://github.com/facebook/hermes/issues/135
# https://github.com/facebook/react-native/issues/31969
# @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