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
Jetpack Compose でやってイイこと・ダメなこと
Search
カーキ
October 06, 2023
Technology
2
540
Jetpack Compose でやってイイこと・ダメなこと
mobile.stmn #2 (2023/10/6)
https://stmn.connpass.com/event/294182/
カーキ
October 06, 2023
Tweet
Share
More Decks by カーキ
See All by カーキ
Composeで敷き詰めるUIを どうやって作るか
takarkiz
0
65
TaskStackBuilderの紹介
takarkiz
0
24
Gemini API でアプリをつくりたい!
takarkiz
0
150
名古屋で勉強会を主催する3つの理由
takarkiz
0
170
GitHub Issue を利用したチケット管理
takarkiz
0
80
Gitの仕組みを理解しよう
takarkiz
0
84
写真と動画の部分的なアクセス権について
takarkiz
0
230
もっとJetpackComposeと仲良くなる
takarkiz
0
290
プログラミングを学ぶこと・教えること
takarkiz
0
72
Other Decks in Technology
See All in Technology
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
300
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
310
成果を出しながら成長する、アウトプット駆動のキャッチアップ術 / Output-driven catch-up techniques to grow while producing results
aiandrox
0
350
Turing × atmaCup #18 - 1st Place Solution
hakubishin3
0
490
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.3k
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.5k
PHPerのための計算量入門/Complexity101 for PHPer
hanhan1978
5
190
UI State設計とテスト方針
rmakiyama
2
620
Wantedly での Datadog 活用事例
bgpat
1
520
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
270
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Unsuck your backbone
ammeep
669
57k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
A Tale of Four Properties
chriscoyier
157
23k
Practical Orchestrator
shlominoach
186
10k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
A better future with KSS
kneath
238
17k
How to Ace a Technical Interview
jacobian
276
23k
Transcript
+FUQBDL$PNQPTFͰͬͯ ΧʔΩ!NPCJMFTUNOʢʣ μϝͳ͜ͱ🙅 ΠΠ͜ͱ🙆
ϓϩϑΟʔϧ Name = “ΧʔΩ” BelongTo = “גࣜձࣾελϝϯ/ϞόΠϧΞϓϦG” Work = “Android
App Engineer” Twitter = “@khaki_ngy” Fav = listOf(“🎞”, “🍳”) / / TODO:ӡӦΛ͍ͯ͠ΔίϛϡχςΟͷΠϕϯτͷհΛ͢Δ Organization = “Liven up NAGOYA”
ࠓ͢͜ͱ 1 . Jetpack Compose Recomposition 2 . 3 .
4 .
+FUQBDL$PNQPTFૉΒ͍͠👏
+FUQBDL$PNQPTFͷྑ͍ͱ͜Ζ❤ UI AndroidView AndroidView Composable Google
+FUQBDL$PNQPTFͷؾʹͳΔͱ͜Ζ👀 Recomposition AndroidView UI Recomposition • ඳըࡁΈͷը໘͕࠶ඳը͞ΕΔ͜ͱ • ࠶ඳըࣗମʹͳ͍ •
ҙਤ͠ͳ͍λΠϛϯάͰRecomposition͕ൃੜͯ͠͠·͏ͱύϑΥʔϚϯεͷԼʹܨ͕Δ
ҙਤ͠ͳ͍ 3FDPNQPTJUJPOΛ͑Δϧʔϧ ࠓ͢͜ͱ
ܕͷ҆ఆੑฤ
ܕͷ҆ఆੑʹ͍ͭͯ ܕͷʮ҆ఆʯʮෆ҆ఆʯ Composable Recomposition Ҿʹ༩͑Δܕ͕҆ఆͳͷ͔ෆ҆ఆͳͷ͔ΛΔඞཁ͕͋Δ
🙆ͬͯΠΠ͜ͱ $PNQPTBCMFؔͷύϥϝʔλʹϓ ϦϛςΟϒܕΛ͏
🙆ΠΠͶ $PNQPTBCMFؔͷύϥϝʔλʹϓϦϛςΟϒܕΛ͏ Recomposition 👍
🙅ͬͯμϝͳ͜ͱ $PNQPTBCMFؔͷύϥϝʔλʹί ϨΫγϣϯܕ -JTU 4FU Λ͏
🙅ؾΛ͚ͭͯ $PNQPTBCMFؔͷύϥϝʔλʹίϨΫγϣϯܕ -JTU 4FU Λ͏ items Recomposition
🙆ͬͯΠΠ͜ͱ *NNVUBCMF-JTUΛར༻͢Δ
🙆ΠΠͶ *NNVUBCMF-JTUΛར༻͢Δ kotlinx.collections.immutable Immutable Collection ImmutableList/ImmutableSet/ImmutableMap
🙅ͬͯμϝͳ͜ͱ ҾʹඇσʔλΫϥεΛར༻͢Δ
🙅ؾΛ͚ͭͯ ҾʹඇσʔλΫϥεΛར༻͢Δ Recomposition
🙆ͬͯΠΠ͜ͱ ίϨΫγϣϯܕΛϥοϓͨ͠Ϋϥεʹ !*NNVUBCMFΞϊςʔγϣϯΛ͚Δ
🙆ΠΠͶ ίϨΫγϣϯܕΛϥοϓͨ͠Ϋϥεʹ!*NNVUBCMFΞϊςʔγϣϯΛ͚Δ Collection @Immutable Items
🙆ͬͯΠΠ͜ͱ ఆͷΈͰߏ͞ΕͨσʔλΫϥε Λར༻͢Δ
🙆ΠΠͶ ఆͷΈͰߏ͞ΕͨσʔλΫϥεΛར༻͢Δ @Immutable
Πϯελϯεੜ
Πϯελϯεੜͷίετ $PNQPTBCMFؔͰͷҙ Composable Composable
🙅ͬͯμϝͳ͜ͱ $PNQPTBCMFؔͷείʔϓͰΠϯ ελϯεΛੜ͢Δ
🙅ؾΛ͚ͭͯ $PNQPTBCMFؔͷείʔϓͰΠϯελϯεΛੜ͢Δ Widget Recomposition Title Title() Composable Recomposition
🙆ͬͯΠΠ͜ͱ ΠϯελϯεੜʹSFNFNCFSΛ ར༻͢Δ
🙆ΠΠͶ ΠϯελϯεੜʹSFNFNCFSΛར༻͢Δ Remember Composition
🙆ͬͯΠΠ͜ͱ SFNFNCFSͷΩʔΛར༻͢Δ
🙆ΠΠͶ SFNFNCFSͷΩʔΛར༻͢Δ remember key
🤷͜ΕͲ͏ʁ SFNFNCFSͷΩʔΛར༻͢Δ Remember Recomposition
🙆ͬͯΠΠ͜ͱ EFSJWFE4UBUF0GΛར༻͢Δ
🙆ΠΠͶ EFSJWFE4UBUF0GΛར༻͢Δ derivedStateOf textColor Recomposition
🤷ཹҙ 3FDPNQPTJUJPOʹහײʹͳΓա͗ͳ͍ Recomposition
3FDPNQPTJUJPOΛݟۃΊΔ🕵
3FDPNQPTJUJPOΛݟۃΊΔํ๏ 1 . Layout Inspector Recomposition 2 . recomposeHighlighter
-BZPVU*OTQFDUPS 3FDPNQPTJUJPOͷݸΛදࣔͰ͖Δʂ
-BZPVU*OTQFDUPSͰ֬ೝ͢Δ্Ͱͷҙ Gira ff e minify false Show Recomposition Counts
SFDPNQPTF)JHIMJHIUFSΛ͏ Google Github Modi fi er Composable Modi fi er
Recomposition
·ͱΊ
ࠓͷ·ͱΊ Jetpack Compose Recomposition Recomposition 領 Recomposition