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
Re-Architecture of ReactNative
Search
sota ohara
September 06, 2023
Programming
0
140
Re-Architecture of ReactNative
2023/09/06 Nihonbashi.js #7
sota ohara
September 06, 2023
Tweet
Share
More Decks by sota ohara
See All by sota ohara
Implement prerendering w/ puppeteer
sottar
1
180
create own CMS from scratch
sottar
2
8.7k
Let’s try to hack AST of JavaScript
sottar
1
1.5k
フロントエンドエンジニアが伝えたい最近の事情
sottar
28
18k
複数人で高速に開発するためのnpmモジュール
sottar
5
2.4k
new version of context in React 16.3
sottar
3
1.5k
2ヶ月半でサービスをリリースした話し
sottar
2
2k
Redux のディレクトリ構成を考える
sottar
2
14k
モダンなJavaScriptアプリケーションでモダンにスタイリングする方法
sottar
9
4.9k
Other Decks in Programming
See All in Programming
スクラムガイドのスプリントレトロスペクティブを改めて読みかえしてみた / Re-reading the Sprint Retrospective Section in the Scrum Guide
mackey0225
3
450
VS Code をプロダクトにどう取り込むか
onomax
1
470
大規模UIKitベースアプリへのTCAの段階的導入/gradual-adoption-of-tca-in-a-large-scale-uikit-based-app
takehilo
1
180
雑に思考を整理する技術と効能
konifar
60
29k
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
140
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
420
禅の心を手に入れよ
eltociear
1
170
Ruby GitHub Packages
bkuhlmann
0
630
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
380
Goのエラースタックトレースの歴史と今後
sonatard
9
1.6k
Kotlin Multiplatform at Stable and Beyond (Android Makers 2024)
zsmb
0
310
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
175
21k
Typedesign – Prime Four
hannesfritz
36
2.1k
Optimizing for Happiness
mojombo
370
69k
A Tale of Four Properties
chriscoyier
151
22k
Building Effective Engineering Teams - LeadDev
addyosmani
28
1.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
648
58k
Building Applications with DynamoDB
mza
88
5.6k
Happy Clients
brianwarren
92
6.4k
The Art of Programming - Codeland 2020
erikaheidi
42
12k
Navigating Team Friction
lara
178
13k
jQuery: Nuts, Bolts and Bling
dougneiner
59
7.1k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Transcript
Re-Architecture of ReactNative Sota Ohara Nihonbashi.js #7 2023/09/06
Profile Sota Ohara @sottar_ CureApp, inc. EM / SWE RENDEZ-VOUS
inc. CTO @sottar
OR
Performance
Performance • ReactNative は Bridge を通して Platform にアクセスする • 独自で
Widget を持っていないので Bridge を通して Platform の Widget を取得する必要がある
NativeBridge JavaScript (JavaScriptCore) Native Android - Java iOS - Obj
C / Swift RN Bridge (C++) • 引数, 返り値などは JSON を使ってやりとり • 実行時には非同期に処理される • アプリ起動時に Module が登録される JSON JSON
JSI (JavaScript Interface)
JSI JavaScript が C++ のオブジェクトへのリファレンスを持つことで、直接 C++ の コードを実行できる仕組み • JSON
を serialize/deserialize する必要がなくなる • Native のコードを同期的に呼び出すことができる • 起動時に Module を登録する必要がなくなる ReactNative 内部で使用する JavaScript の engine を選べるようになった
Turbo Modules Fabric Native Components
Turbo Modules JSI の仕組みを使った新しい Native Module システム Location や Bluetooth
など Native の機能を同期的に実行することができる JS Thread JSI Native Android - Java iOS - Obj C / Swift
Fabric Native Components • Fabric Renderer を使用して画面上に Native Component をレンダリング
するもの • JSI を使用することで View の更新を同期的に行う仕組み • React Concurrent Mode を前提に書かれていて、ユーザーのインタラクショ ンに優先順位をつけて最適な描画を行えるようになる
Performance Benchmarks https://github.com/reactwg/react-native-new-architecture/discussions/123
Thank you.