© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2023
P. FrieseAsynchronous Programming with SwiftUI and Combinehttps://doi.org/10.1007/978-1-4842-8572-5_4

4. State Management

Peter Friese1  
(1)
Hamburg, Germany
 

SwiftUI is different from many other UI toolkits you might have worked with before: you cannot manipulate the UI views directly. Any changes you see on screen are determined by the state of the application’s data model and its transitions. You might have heard “in SwiftUI, the view is a function of the application’s state.”

What does this mean, and why is this such a big deal?

Imperative UI toolkits suffer from one very big flaw: they allow developers to update model and view independently. This often results ...

Get Asynchronous Programming with SwiftUI and Combine: Functional Programming to Build UIs on Apple Platforms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.