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 under the hood
Search
HyunWoo Lee
August 14, 2024
Programming
250
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React Native under the hood
HYPER-APP 2024에서 진행한 React Native under the hood의 Speaker Deck입니다.
HyunWoo Lee
August 14, 2024
More Decks by HyunWoo Lee
See All by HyunWoo Lee
선언형 햅틱 라이브러리 진동을 소개합니다
l2hyunwoo
1
280
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
250
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
160
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
200
Navigating Dependency Injection with Metro
l2hyunwoo
1
520
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
1
850
Understanding Kotlin Multiplatform (Busan)
l2hyunwoo
0
130
Understanding Kotlin Multiplatform
l2hyunwoo
0
420
파급효과: From AI to Android Development
l2hyunwoo
0
430
Other Decks in Programming
See All in Programming
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
150
Event is what happens
moro
2
3.5k
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
200
Lambda durable functionsでHuman in the Loopを楽に…楽に……
har1101
2
280
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
3
1.4k
Inertia Rails: The One-Person Framework with React & Friends
skryukov
0
380
Railsバージョンを4倍にした話
optim
0
920
Enforcing Your Architecture with Unit Tests in the AI Era (Swift Connection X)
steliosf
PRO
1
130
小さなアプリを作って公開するまで
onozaty
0
120
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
5.6k
まずはコードより業務と向き合う:テーブル解体のためにPdMを呼んだ話
sakawe_ee
0
140
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
25k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Done Done
chrislema
187
17k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
560
Writing Fast Ruby
sferik
630
63k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
The Curse of the Amulet
leimatthew05
3
16k
Product Roadmaps are Hard
iamctodd
55
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
30 Presentation Tips
portentint
PRO
1
460
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.7k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Transcript
이현우, Viva Republica (Toss) React Native Under The Hood
HyunWoo Lee • Android(React Native) Developer, Toss • Organizer, Kotlin
User Groups • Organizer, GDG Songdo Github: https://github.com/l 2 hyunwoo LinkedIn: https://www.linkedin.com/in/hyunwoo-lee- 0412 / Medium: https://medium.com/@l 2 hyunwoo Velog: https://velog.io/@l 2 hyunwoo
From code to application 목차 Motivation React Native에 대한 간략한
소개
Motivation 이번 세션을 준비한 동기 누가 들으면 좋을까요?
Motivation
Motivation
Motivation 그래서 어떻게 돌아가죠?
Introduction to React Native Learn Once, Write Anywhere
React Native
React Native • 플랫폼별로 android/ios 폴더가 존재 • 플랫폼 빌드를
위한 여러가지 파일들이 포함되어 있음 • 이외의 Javascript 관련파일 구성 사항들은 React 프로젝트와 거의 동일
Fron code to application JavaScript에서 하나의 모바일 앱으로
// A.tsx <View> <Text>Hello A!</Text> </View> // B.tsx <View> <Text>Hello
B!</Text> </View>
JavaScript의 언어특성 • JavaScript는 모듈화된 자바스크립트 파일들을 읽어내지 못함 •
여러 파일들을 하나의 파일로 만들어주는 도구가 필요함 // A.tsx <View> <Text>Hello A!</Text> </View> // B.tsx <View> <Text>Hello B!</Text> </View>
Bundler 여러 모듈/파일을 하나의 파일로 묶는다
None
React Native - Metro • 번들링 • 유틸성 코드 주입(Polyfill)
• console.log를 네이티브에서 기록하기 위한 기능 • 리액트 네이티브 초기화(InitializeCore)
React Native - Metro • 번들링 • 유틸성 코드 주입(Polyfill)
• console.log를 네이티브에서 기록하기 위한 기능 • 리액트 네이티브 초기화(InitializeCore)
코드 변환 - Babel 메트로에 의해 번들링된 코드를 React Native
실행환경에 맞게 변환하는 과정 Babel이라는 라이브러리 활용 중
Runtime 코드가 실행되는 환경
None
None
None
First Choice - JSC(JavaScript Core) • Apple에서 제공하는 JavaScript Runtime
• JSC를 활용해서 리액트 네이티브를 돌아가게 만들 수 있었지만 • C 기반 API • 브릿지가 가져가야하는 너무 많은 책임들 • JSC와 리액트 네이티브의 강결합 • 이와 같은 문제점들이 대두됨
엔진을 추상화해볼까? - JSI
JSI의 Data Flow (Native to JS) • Android/iOS에서는 C++로 명령을
보내면서 JSI(shared memory layer 에서) 호출 • 메모리 업데이트 되면 JS에 반영이 되어서 표시됨
JSI의 Data Flow (JS to Native Module) 1 . 네이티브
모듈을 호출하면 JS엔진에 자바스크립트 값을 전달한다.
JSI의 Data Flow (JS to Native Module) 2 . HostFunction로
이 값이 전달되고. 함수는 이를 C++ dynamic으로 변환 한다.
JSI의 Data Flow (JS to Native Module) 3 . 이
값은 네이티브 모듈 인프라로 전달 된다. 4 . 플랫폼에서는 이를 플랫폼 타입으로 변환하고 메서드 호출하는 것을 확인
JSI를 활용한 Rendering 전략
And Next React Native is evolving right now.
New Architecture - Three Pillars • Turbo Module • Fabric
• Codegen
New Architecture - Three Pillars • Turbo Module • 특정
모듈을 지연 초기화시켜 앱 시작 속도 개선 • Fabric • 새로운 UI 렌더링 아키텍처. • 유저 인터랙션(스크롤, 제스처)을 메인스레드/네이티브 스레드에서 동기적으로 처리 • Codegen • 플랫폼 코드의 타입을 JS에서도 활용할 수 있게 정적 타이핑 지원 • TypeScript 활용시 이득
None
None