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

Design An Immutable UI Model

Model a screen with clear, immutable state, then change the state contract yourself.

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 To Composables
  5. 05Part 4: Close Off The Screen Modes With Sealed State
  6. 06Part 5: Why Loose 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 114 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