Dan Tech Academy
After this lesson you will
  • Design immutable UiState with data class, val, and ImmutableList
  • Model screen modes with a sealed UiState instead of scattered flags
  • Edit a Compose UI state contract directly and validate it with unit tests
Duration10 min
DifficultyBeginner

Design Immutable UI Models

Model a screen with explicit immutable state, then edit the state contract with your own hands

What this lesson covers
  1. 01Lesson Goal
  2. 02Part 1: A Screen Is a Set of States
  3. 03Part 2: A Data Contract Is Not a UI Model
  4. 04Part 3: Immutability Is the Key for Composables
  5. 05Part 4: Close Screen Modes With Sealed State
  6. 06Part 5: Why Scattered Flags Are a Red Flag
  7. 07Part 6: Drill 1 - Change the Number of Skeleton Rows
  8. 08Part 7: Drill 2 - Add a Sealed Variant
  9. 09Part 8: What Belongs in Persistent UI State?
  10. 10Code Reading Path
  11. 11Checkpoint
  12. 12Bad Smells

Topics: mobile-action-pro, compose-state

12 sections left in this lessonUnlock all of Mobile Action ProLesson Goal, Part 1: A Screen Is a Set of States, … — plus 64 lessons in this course, source code and checklists.
Unlock Mobile Action ProOne-time payment — lifetime access — 7-day money-back. Already purchased? Sign in
Sign in