Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
React Native Architecture in 2021
Search
Akinn Rosa
October 16, 2021
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React Native Architecture in 2021
Slides for talk about React Native Re-architecture on React Conf Brazil 2021
Akinn Rosa
October 16, 2021
More Decks by Akinn Rosa
See All by Akinn Rosa
Over-The-Air Updates in React Native
akinncar
0
25
React Native Universal Apps
akinncar
0
9
Aplicativo Móvel para gestão de fidelidade de clientes
akinncar
0
33
Developing 3D multiplatform games with three.js in React Native
akinncar
0
140
Other Decks in Technology
See All in Technology
[2026 Oracle Technical Deep Dive] AI時代のアプリケーションを支えるCloud NativeとJava EEモダナイゼーション (2026年9月17日開催)
oracle4engineer
PRO
0
100
SREでアラート疲れを 解決しよう!
kairim0
1
110
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
390
[2026 Oracle Technical Deep Dive] オンプレミスDBのCloud移行アプローチ:移行計画に基づくメソッドとツールの選択 (2026年9月17日開催)
oracle4engineer
PRO
0
110
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
300
『GOエコノミー 』(相乗りサービス) におけるスペック駆動開発
mot_techtalk
1
250
1万名の社員が使う認証基盤で どう信頼性を担保するか?
kairim0
0
180
Snowflake Horizon Catalog と Apache Iceberg で作る オープンなデータ基盤
kitagawaz
0
400
自律型 AI をセキュアに実装!Gemini と MIG で作る動的コード実行環境
recruitengineers
PRO
1
130
HolmesGPTで始めるSREエージェント入門!プラットフォームの障害調査はAIにお任せ 〜
sanghyuk
0
260
ビジネスを止めない技術的負債の返済のための戦略とその手法 - 技術的負債と向き合う / Complexity and Simplicity
soudai
PRO
3
500
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
160
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
Building the Perfect Custom Keyboard
takai
2
890
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
550
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
570
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.1k
Design in an AI World
tapps
1
340
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
460
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
4 Signs Your Business is Dying
shpigford
187
23k
エンジニアに許された特別な時間の終わり
watany
109
250k
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