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
Circuit 찍먹해보기(부제: Circuit 절망편)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
easyhooon
July 15, 2025
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Circuit 찍먹해보기(부제: Circuit 절망편)
easyhooon
July 15, 2025
More Decks by easyhooon
See All by easyhooon
Circuit 찍먹해보기(부제: Circuit 희망편)
easyhooon
0
160
Compose Multiplatform Image Picker
easyhooon
0
220
Featured
See All Featured
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
420
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
200
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
380
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
200
Documentation Writing (for coders)
carmenintech
77
5.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
140
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
23k
We Have a Design System, Now What?
morganepeng
55
8.2k
Agile that works and the tools we love
rasmusluckow
331
21k
Transcript
ള Circuit ନݡ ೧ࠁӝ Circuit ݎಞ
ݾର - Circuit ױٜ ࣗѐ • ۨಌ۠झо ࠗೣ • ী۞ݫࣁо
ࠛೣ • Circuit Navigation ࢎਊद feature ݽٕр ࣽജ ଵઑ ߊࢤ ਤ(೧Ѿ) • AAC ViewModelਸ ࢎਊೡ ࣻ হ • Presenterীࢲ Eventܳ ߑೡ ࣻ হ • Migration ࠺ਊ ఀ • ܻ • Ӓۢীب ࠛҳೞҊ...!
1. ۨಌ۠झо ࠗೣ https://github.com/slackhq/circuit/discussions • ҕध ޙࢲо ӟ ೞ݅,
ܳ ਊೠ ࢠٜ ݒ ࠗೠ ࢚ട Circuit github samples -> ցޖ рױೣ Maintainer ZacSweersש ѐੋ ۽ં(CatchUp) -> য۰ chrisbanesש ѐੋ ۽ં(tivi) -> ѐয۰ • ۽ંী بੑೡ ۄ࠳۞ܻܳ ࢶೡ ٸ, ۄ࠳۞ܻ ࢤక҅о ੜ ҳ୷غয חח ਃೠ ࢎউ • Ӓա݃ ೯ github Discussionsо ഝߊ غҊ !
1. ۨಌ۠झо ࠗೣ য়טب discussionী Ӗਸ ࢿ೮... • Ӓېب ই
ҾӘೠ ٜࠗ࠙ ݆. (Still Hungry) • ߸೧ ࢎۈ ...ƕ ٜ ߄ࢂо ࠁ...
2. ী۞ ݫࣁо ࠛೣ • Circuit kspܳ ా೧ ࠁੌ۞ۨ ٘ܳ
ࢤࢿೞח ߑधਸ ࢎਊ -> hilt/dagger৬ э DI ۄ࠳۞ܻ য֢ప࣌ਸ भ࠙ ഝਊ -> Ӓ ূ, Navigatorա Screen ੋझఢझ э ۠ఋ ۄఠܳ زਵ۽ ੑೞӝ ਤೠ @AssistedInject৬ э য֢ప࣌ ನೣؽ -> য֢ప࣌ਸ ೞաۄب ࡅڰܾ ҃, ஹੌ/۠ఋী ী۞о ߊࢤೞѱ غחؘ যڃ য֢ప࣌ਸ ࡅ ڰ۰ࢲ ߊࢤೠ Ѫੋ Ӓ ਗੋਸ ী۞ ݫࣁܳ ా೧ ইղӝ য۰ (ksp৬ Daggerী ೠ ೧о ࠗ೧ࢲ Ӓ۠ Ѫ эӟೣ) What? Route not available?...
• goTo()ܳ ా೧ ചݶ زद, ز ೧ঠೡ ݽٕਸ ઓ೧ঠೞח ޙઁ
ߊࢤ • A -> B -> C ... -> A feature ݽٕр ࣽജ ଵઑо ߊࢤ ೡ ࣻ • ۽Ӓੋਸ ਗೞח ҃, ࠗ࠙ feature ݽٕ feature:login ݽ ٕਸ ઓೞח ޙઁ ߊࢤ 3. Circuit Navigation ࢎਊद feature ݽٕр ࣽജ ଵઑ ߊࢤ ਤ(೧Ѿ)
3. Circuit Navigation ࢎਊद feature ݽٕр ࣽജ ଵઑ ߊࢤ ਤ(೧Ѿ)
https://github.com/YAPP-Github/Reed-Android/pull/39 • Circuitীࢲ Screen UI৬ Presenterܳ োѾೞח Key(ध߹ ೡ) • screens ݽٕਸ ࢤࢿೞৈ, ݽٚ Screen(ݾ)ٜਸ ҙܻ • ݽٚ feature ݽٕ screens ݽٕ݅ਸ ઓೞب۾ ࢸ҅
4. AAC ViewModelਸ ࢎਊೡ ࣻ হ • Circuit AAC ViewModelਸ
ࢎਊೞ ঋҊ, Circuitীࢲ ਗೞח ߹ب Presenterܳ ࢎਊ • Android ѐߊীࢲ AAC ViewModelۆ? -> Con fi guration Change۽ ࠗఠ ؘఠ(࢚క) ܳ ࠁઓ оמ -> viewModelScopeܳ ా೧ উೞѱ ࠺زӝ ܻܳ ೡ ࣻ -> ೠ݃٣۽ AAC ViewModel न(ᙲ)
4. AAC ViewModelਸ ࢎਊೡ ࣻ হ • Android ѐߊীࢲ AAC
ViewModelਸ ࢎਊೡ ࣻ হח Ѫ... • Con fi guration Change۽ ࠗఠ ؘఠ(࢚క)ܳ ࠁઓೡ ࣻ হ -> Circuit rememberRetainedܳ ా೧ оמ • viewModelScopeܳ ా೧ উೞѱ ࠺زӝ ܻܳ ೡ ࣻ হ -> rememberCoroutineScope۽ оמ(?)
4. AAC ViewModelਸ ࢎਊೡ ࣻ হ • ݈۽ rememberCoroutineScopeо viewModelScopeܳ
ೡ ࣻ ਸө? • viewModelScopeח ױࣽೠ ܖ౯ झо ইש • ViewModel Lifecycleҗ ೣԋ ઙܐغয ݫݽܻ ־ࣻ ਤਸ ઁѢ • SupervisorJobਸ ా೧ ܖ౯ झܳ ࢤࢿೞৈ, ೞਤ ܖ౯ ೞաо ৻۽ ஂࣗغ؊ۄب, ܲ ܖ౯ী ೱਸ ঋب۾ ࢸ҅ https://github.com/slackhq/circuit/discussions/1883 -> ۞ೠ ޙਸ ೧ Discussionਸ ా೧ ೧ࣗೡ ࣻ
5. Presenterীࢲ Eventܳ ߊ೯ ೡ ࣻ হ Circuit Presenter •
UI۽ ࠗఠ ׳ ߉ ߮(eventSink)ܳ ా೧ ࠺زӝ সਸ ࣻ೯ೞҊ, ܳ ా೧ সؘػ Stateܳ UIীѱ ߈ജ • Presenterղীࢲ _uiEvent.send(Event), postSideE ff ect(SideE ff ect) ١ ߮ ߊ೯ ࠛоמ
5. Presenterীࢲ Eventܳ ߑೡ ࣻ হ ҕधޙࢲ ղਊ ߊ ߂
ߣ) • ਫ਼Ӭ, Stateఋੑী ߮ ߔ ನೣغয Ҋ? -> ֎! ӝઓ UDF(Unidirectional Data Flow) ಁఢҗח ܰѱ וԑ ࣻ ݅, Circuitীࢲח ߮ ߊ೯ਸ ࢚క ೠ ࠗ࠙ਵ۽ ஂәפ. ীח ߮(Flow) ߑधҗ Circuit ղࠗਵ۽ ߮ ܳ ҙܻೞח ಁఢਸ ࢎਊ೮ਵա, ۽ ੋೠ ઁডࢎ೦җ ࠂ ࢿ ٸޙী Ә Ӕߨਸ ఖೞѱ غणפ. Eventܳ State۽ ҙܻ • Compose Stateܳ ా೧ Eventܳ ܻ(on/o ff ߑध, Like StateFlow) • Channel ࢸա ߮ झܿ, ݣ౭ நझ ١ ࠂೠ ղࠗ ࢸ স ਃೞ ঋ • Flow৬ ׳ܻ, Eventо ਬपؼ ਤ হ(ױ, ۞ೠ Event ܻߑधਸ ࢶഐೞ ঋਸ ࣻ ) https://slackhq.github.io/circuit/states-and-events/
ߣ৻) StateFlow vs Compose State • Compose Stateח StateFlow update৬
э ਗ(Atomic) োܳ ਗೞ ঋ • ৈ۞ झۨ٘ীࢲ زदী Compose Stateী Ӕೡ ҃ race condition ߊࢤೡ ࣻ ! • ࠁా ҃ Main(UI) Threadীࢲ݅ Ӕೞחۄ ޙઁо হ݅, Circuitীࢲח زद ߮ ܻद ৈ۞ ܖ౯ э Stateܳ ࣻೞৈ race condition ߊࢤ ۰ؽ https://wooyoung-tom.medium.com/is-mutablestateof-not-thread-safety-12ea1bfb2bb7 ܻ೧ࢲ Discussion ৢ۰ࠅ ੋؘ, ۞ೠ ࠗ࠙ਸ ࢸ݃ рҗ೮ਸөਃ? Circuit ѐߊٜ࠙ݶ ਤ ղਊਸ ো ঌҊ ਸ బؘ ࠙ Ҋ۰ػ ࢸ҅ੋ ҾӘפ.
6. Migration ࠺ਊ ఀ • AAC ViewModelਸ ࢎਊೞ ঋҊ, Circuit
Presenterܳ ࢎਊ • Compose Navigationਸ ࢎਊೞ ঋҊ, Circuit Navigationਸ ࢎਊ -> ӝઓ ۽ંܳ Circuitਵ۽ Migrationೞחؘ ੋ স ਃ • ژೠ, ܲ MVI ۨਕ?(ۄ࠳۞ܻ?)ٜ ࠁ ۞ழ࠳о ࠺Ү ֫ ಞ -> ղ नӏ ੋਗ ైੑؼ ҃, Circuitਸ ೧ೞҊ ࣼ೧ח ؘ ࢚ೠ ৡࠁ٬ दр ਃೡ Ѫਵ۽ ࢚
✅ ۞࠶ ग ߂ ҳഅ о٘ ١ पޖ ѐߊী ਃೠ
ۨಌ۠झ ࠗ ✅ AAC ViewModel ࢎਊ ࠛо, Presenter ߮ ߊ೯ ࠛоמ ١ ӝઓ ѐߊߑध ࠺ ઁড ࢎ೦ ઓ ✅ بੑ द ֫ Migration ҕࣻ৬ ৡࠁ٬ ࠺ਊ, ୶റ ܲ ইఃఫ ߸҃ द ୶о ജ ࠺ਊ ߊࢤ ࢤక҅о ই ࢿ ױ҅ী য ۽؋࣌ ജ҃ীࢲ بੑೞӝীח नೠ Ѩషо ਃೠ द...! Circuit ױ ܻ 🗒 Ӓؘ۠ ۽؋࣌ী بੑೠ ഥࢎٜ ৈۤ ח٠ פ. оҊर
Ӓۢীب ࠛҳೞҊ...! • ۨಌ۠झо ࠗਵ۽ Circuit ղࠗ ࣗझܳ ࠙ࢳ೧ࠁݴ
Compose, DI, ViewModel ١ ী ೠ ӝࣿ ೧۱ ೱ࢚ • Circuit ҙ۲ ۨಌ۠झܳ ࢿ೧ࠁݴ, ஶܻ࠭ఠ۽ ࢿೡ ࣻ ח ӝഥ ദٙ • Android ѐߊ ېо ؼ ࣻ ח Compose-First ইఃఫ ࢶҳ ҃ णٙ https://news.hada.io/topic?id=21894
ۨಌ۠झ • https://slackhq.github.io/circuit/ • https://github.com/slackhq/circuit • https://github.com/slackhq/circuit/discussions • https://velog.io/@mraz3068/series/Circuit •
https://news.hada.io/topic?id=21894 • https://wooyoung-tom.medium.com/is-mutablestateof-not-thread- safety-12ea1bfb2bb7
Q&A хࢎפ ߣী ؊ ফӝೡ ԅ...