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
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
110
C++26 エラー性動作
faithandbrave
2
760
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
250
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
480
サーバレスアプリ開発者向けアップデートをキャッチアップしてきた #AWSreInvent #regrowth_fuk
drumnistnakano
0
200
なぜCodeceptJSを選んだか
goataka
0
160
社内イベント管理システムを1週間でAKSからACAに移行した話し
shingo_kawahara
0
190
podman_update_2024-12
orimanabu
1
280
Microsoft Azure全冠になってみた ~アレを使い倒した者が試験を制す!?~/Obtained all Microsoft Azure certifications Those who use "that" to the full will win the exam! ?
yuj1osm
2
110
スタートアップで取り組んでいるAzureとMicrosoft 365のセキュリティ対策/How to Improve Azure and Microsoft 365 Security at Startup
yuj1osm
0
220
非機能品質を作り込むための実践アーキテクチャ
knih
5
1.4k
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Docker and Python
trallard
42
3.1k
Site-Speed That Sticks
csswizardry
2
190
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Music & Morning Musume
bryan
46
6.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
The Pragmatic Product Professional
lauravandoore
32
6.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
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