Conclusion
Here’s what you did in this lesson:
- Implemented state management within a ViewModel using Observation.
- Differentiated between
publicandprivateor@ObservationIgnoredproperties in ViewModels and their appropriate usage scenarios.
Views can track changes to all the properties in an @Observable object, except those you mark as private or @ObservationIgnored.