takahirom
03/25/2022, 11:03 AM@Composable
fun Composable1(articles: Articles) {
Text(text = "Hello $articles!")
}
@Stable
data class UiModel(val articles: Articles)
@Composable
fun Composable2(uiModel: UiModel) {
Text(text = "Hello $uiModel!")
uiModel.articles.articles.forEach {
Composable3(it)
}
}
@Composable
fun Composable3(article: Article) {
Text(text = "Hello $article!")
}
model module
data class Articles(val articles: List<Article>)
data class Article(val title: String)
app_release-composables.txt
restartable fun Composable1(
unstable articles: Articles
)
restartable skippable fun Composable2(
stable uiModel: UiModel
)
restartable fun Composable3(
unstable article: Article
)
source code
https://github.com/takahirom/compose-multi-module-stabilityritesh
03/25/2022, 11:38 AMdata class Article(val title: String)
is unstabledata class Articles(val articles: List<Article>)
This is unstable because List
isAlbert Chang
03/25/2022, 1:00 PMshikasd
03/25/2022, 4:48 PMmyanmarking
03/25/2022, 5:48 PMtakahirom
03/26/2022, 2:02 AM@Stable
class that has Compose's Compiler applied to it.
https://github.com/takahirom/compose-multi-module-stability/commit/a4a1a34ec769a8524309a2205f43b8f28ce6e633#diff-14e800d090d55[…]dd4bae3552a9e209bL1