Skip to content

Instantly share code, notes, and snippets.

@takahirom
Created March 27, 2022 07:40
Show Gist options
  • Save takahirom/25bb0fdc16ed9cc036eb87beba47f764 to your computer and use it in GitHub Desktop.
Save takahirom/25bb0fdc16ed9cc036eb87beba47f764 to your computer and use it in GitHub Desktop.
app module
@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!")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment