# ViewModels in Jetpack Compose: Their Uses, Alternatives, and Setup

DevFeed: [ViewModels in Jetpack Compose: Their Uses, Alternatives, and Setup](<https://devfeed.tech/articles/why-you-need-viewmodels-and-why-you-don-t-28461.md>)

Original publisher: [Read original article](<https://composables.com/blog/viewmodels-in-jetpack-compose>)

Author: Alex Styl

Published: 2023-05-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Composables - Concise, no-fluff video tutorials for Android developers](<https://devfeed.tech/sources/composables-concise-no-fluff-video-tutorials-for-android-developers.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Android](<https://devfeed.tech/topics/android.md>), [API](<https://devfeed.tech/topics/api.md>), [business logic](<https://devfeed.tech/topics/business-logic.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [architecture-design](<https://devfeed.tech/tags/architecture-design.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [viewmodel](<https://devfeed.tech/tags/viewmodel.md>)

## AI overview

A tutorial explaining Android ViewModels in Jetpack Compose, including how they preserve data across configuration changes, hold UI-related business logic, and emit updated state. It also discusses when ViewModels may not be necessary, alternatives outside Android, and the dependencies used to access them in composables.

## Source excerpt

Everything you need to know about ViewModels in Jetpack Compose