Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
React Native Architecture in 2021
Search
Akinn Rosa
October 16, 2021
Technology
0
220
React Native Architecture in 2021
Slides for talk about React Native Re-architecture on React Conf Brazil 2021
Akinn Rosa
October 16, 2021
Tweet
Share
More Decks by Akinn Rosa
See All by Akinn Rosa
Over-The-Air Updates in React Native
akinncar
0
16
React Native Universal Apps
akinncar
0
5
Aplicativo Móvel para gestão de fidelidade de clientes
akinncar
0
26
Developing 3D multiplatform games with three.js in React Native
akinncar
0
130
Other Decks in Technology
See All in Technology
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
610
Context Engineeringの取り組み
nutslove
0
340
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
230
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
Webhook best practices for rock solid and resilient deployments
glaforge
1
290
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
420
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
140
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
StrandsとNeptuneを使ってナレッジグラフを構築する
yakumo
1
120
GitLab Duo Agent Platform × AGENTS.md で実現するSpec-Driven Development / GitLab Duo Agent Platform × AGENTS.md
n11sh1
0
140
Featured
See All Featured
What does AI have to do with Human Rights?
axbom
PRO
0
2k
It's Worth the Effort
3n
188
29k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
93
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
120
The Cost Of JavaScript in 2023
addyosmani
55
9.5k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
Odyssey Design
rkendrick25
PRO
1
500
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
66
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
54
Transcript
React Native Architecture in 2021 Akinn Rosa
Akinn Rosa @akinncar @akinncar Fullstack Developer
Overview
Current Architecture
React "Native"
Native Component
Native Component: Color View ColorViewManager.java
Native Component: Color View ColorPackage.java lic class ColorPackage implements ReactPackage
{ @Override public List<NativeModule> createNativeModules(ReactApplicationContext reactContext return Collections.emptyList(); } @Override public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) return Arrays.<ViewManager>asList(new ColorViewManager()); }
Native Component: Color View App.js import { requireNativeComponent } from
'react-native'; export const ColorView = requireNativeComponent('ColorView'); export default function App() { return ( <View style={{ flex: 1 }}> <ColorView color="#32a852" style={{ flex: 1 }} /> </View> ); }
Native Module
Native Module: Sum SumModule.java
Native Module: Sum ColorPackage.java lass SumPackage implements ReactPackage { rride
ic List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactCo List<NativeModule> modules = new ArrayList<>(); modules.add(new SumModule(reactContext)); return modules; rride ic List<ViewManager> createViewManagers(@NonNull ReactApplicationContext reactCont return Collections.emptyList();
Native Module: Sum App.js import { NativeModules } from 'react-native';
const { SumModule } = NativeModules; export default function App() { return ( <View style={{ flex: 1 }}> <Text>Result: {SumModule.sum(2, 2)}</Text> </View> ); }
Threads
Threads
Threads
Threads
Threads
Threads
Problems
Current ScrollView
Turbo Modules Is the new generation of React Native Modules.
It aims to work with native functions like browsers, exposing native functions using JSI and improving module performances.
Browser Native Function
Javascript Interface (JSI) JSI is an engine-independent API to interact
with Javascript from C++. It allows to call functions and hold references on these two languages, without the need for any serialization.
Sum Module Header (Objective-C++) Sum.h #import <React/RCTBridgeModule.h> #import "react-native-sum.h" @interface
Sum : NSObject <RCTBridgeModule> @property (nonatomic, assign) BOOL setBridgeOnMainQueue; @end
Sum Module (Objective-C++) Sum.mm
Sum Module Header (C++) react-native-sum.h #include <jsi/jsilib.h> #include <jsi/jsi.h> void
installSum(facebook::jsi::Runtime& jsiRuntime);
Sum Module (C++) react-native-sum.cpp
Sum Module (Javascript) App.js export default function App() { return
( <View style={{ flex: 1 }}> <Text>Result: {global.sum(2, 2)}</Text> </View> ); }
Libraries implemented using JSI react-native-reanimated react-native-vision-camera react-native-mmkv react-native-quick-sqlite
Fabric Is the new React Native renderer. With Fabric, the
UI operations are exposed to Javascript with JSI. This new UI can create and update native components passing information without using the bridge.
Current Architecture
New Architecture
New Architecture + Codegen
Codegen (react-native-codegen) Automation to compatibility JS and Native code. It's
a generator that will define your classes and functions in C++ base on types with Typescript and Flow, to avoid data validation every time.
What should I do?
What's next?
References The New React Native Architecture Explained David Vacca -
The state of React Native Parashuram N - React Native's New Architecture Emily Janzer - The New React Native React-native JSI module React Native JSI: Part 1 - Getting Started Bringing the Fabric renderer to the “Facebook” app React Native in H2
Be my Patreon: https://www.patreon.com/akinncar
Thanks! @akinncar @akinncar