<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6" -->

---
title: Where Should Initial Load Logic Actually Live in Jetpack...
description: A comprehensive guide to deciding where initial data-loading logic should live in Jetpack Compose apps. Covers four patterns: LaunchedEffect(Unit) as a code...
canonical: https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Where Should Initial Load Logic Actually Live in Jetpack Compose? | daily.dev
og:description: A comprehensive guide to deciding where initial data-loading logic should live in Jetpack Compose apps. Covers four patterns: LaunchedEffect(Unit) as a code...
og:url: https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6
og:image: https://api.daily.dev/og/posts/hcfVjBgH6.png
og:image:alt: Where Should Initial Load Logic Actually Live in Jetpack Compose?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Where Should Initial Load Logic Actually Live in Jetpack Compose?

**[ProAndroidDev](https://daily.dev/sources/pand)** · 17 min read · 3 upvotes · 0 comments

## Summary

A comprehensive guide to deciding where initial data-loading logic should live in Jetpack Compose apps. Covers four patterns: LaunchedEffect(Unit) as a code smell (Pattern 0), init{} in ViewModel (Pattern 1), explicit action dispatch with sealed interfaces (Pattern 2), and reactive .onStart+stateIn pipelines (Patterns 3 and 4). Each pattern is analyzed with real trade-offs around configuration changes, process death, backstack behavior, retry support, and unit testability. A decision flowchart helps teams pick the right pattern based on their specific constraints. The meta-lesson: the real issue is using the UI layer as a business trigger rather than a lifecycle signal, and the ViewModel should always own state and logic.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://proandroiddev.com/where-should-initial-load-logic-actually-live-in-jetpack-compose-b59b73f97c79>

## Similar posts on daily.dev

- [Four Ways to Avoid Prop Drilling in Jetpack Compose](https://daily.dev/posts/four-ways-to-avoid-prop-drilling-in-jetpack-compose-hymkuq3ni) · ProAndroidDev · 1 upvotes · 0 comments
- [Stop Recomposition Errors: How to Correctly Handle One-Time Events in Jetpack Compose](https://daily.dev/posts/stop-recomposition-errors-how-to-correctly-handle-one-time-events-in-jetpack-compose-htqwamolo) · droidcon · 0 upvotes · 0 comments
- [Leverage the essentials: Jetpack Compose best practices](https://daily.dev/posts/leverage-the-essentials-jetpack-compose-best-practices-xxhv9qgoo) · Medium · 0 upvotes · 0 comments
- [Stop Passing ViewModels to Your Composables?](https://daily.dev/posts/stop-passing-viewmodels-to-your-composables--lshjhtw8a) · ProAndroidDev · 4 upvotes · 0 comments

---

Tags: [#kotlin](https://daily.dev/tags/kotlin), [#jetpack-compose](https://daily.dev/tags/jetpack-compose)

[View this post on daily.dev](https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Where Should Initial Load Logic Actually Live in Jetpack Compose?","url":"https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6"},"datePublished":"2026-03-16T16:15:37.827Z","dateModified":"2026-03-16T16:16:08.829Z","description":"A comprehensive guide to deciding where initial data-loading logic should live in Jetpack Compose apps. Covers four patterns: LaunchedEffect(Unit) as a code...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c934e3c7f74f0d6847b773b1cbf32d63?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/c934e3c7f74f0d6847b773b1cbf32d63?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ProAndroidDev","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ProAndroidDev","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/656c1eb1f1ef4f91936e86fc16545114","url":"https://daily.dev/sources/pand"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/where-should-initial-load-logic-actually-live-in-jetpack-compose--hcfvjbgh6","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"kotlin,jetpack-compose","timeRequired":"PT17M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ProAndroidDev","item":"https://daily.dev/sources/pand"},{"@type":"ListItem","position":3,"name":"Where Should Initial Load Logic Actually Live in Jetpack Compose?"}]}
```

