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