Tag: ViewModel

Best Practises In ViewModel

Why do we need ViewModel? In Android, UI state get’s destroyed during configuration changes like screen rotation, screen size changes etc. To persist the UI state and to access business logic, we need a plan class named ViewModel able to persist the UI state during configuration changes and...

Jetpack Compose with ViewModel and Flow: A Comprehensive Guide

The Android landscape has significantly evolved with Jetpack Compose, a modern UI toolkit that simplifies UI creation while also enabling the seamless transition towards declarative UIs. Coupled with ViewModel and Flow, Jetpack Compose becomes an even more potent tool. ViewModel assists in managing ...