分類: kotlin
-
@Immutable @Stable 如果 immutableList 內包含 list .這樣會造成 recompstion 嗎?
會.結束 1. List 會造成嚴重的重組問題嗎?在哪種情況? 答案是:會,而且絕對比你想像的更嚴重。 kot…
-
Hilt 指南 組內分享
市場上已經很多依賴注入套件(dagger , koin)的選擇 ,還有很多文章介紹了,我會選擇 hilt 很單…
-
handle all repostiory operation that out of Composable/ViewModel scope
作法一:async + await(我要結果,但任務不能停) 這招的核心是「分離執行與等待的生命週期」。Rep…
-
Difference between constructors and init in kotlin

原文 誰負責「定義」?誰負責「執行」? 在 Kotlin 中,Object 創建是個有順序的過程。constr…
-
Jetpack Compose: 何時該用 derivedStateOf?

官方導讀 derivedStateOf 是一個效能優化工具,專門用來防止因「來源狀態」變化過於頻繁而導致的**…
-
viewModelScope vs rememberCoroutineScope 其實沒啥好 versus ,就是 SOC 職責分離

viewModelScope:與 ViewModel 的生命週期綁定,只能用在資料/邏輯層。 remember…