Myvideo

Guest

Login

MVVM SwiftUI Tutorial - State Management and Data Flow through SwiftUI - Example Refactoring

Uploaded By: Myvideo
1 view
0
0 votes
0

In this video we talk about MVVM (Model - View Model - Model), which is a design pattern recommend for SwiftUI 🤩. Next we will see what MVVM means and how it works with SwiftUI. A important part is to understand the data flow. We will see why we use ObservableObject and @Published. We will be talking about the declarative programming in SwiftUI, where “the truth“ comes in. In the view part we will see the difference between @ObservedObject, @StateObject and @EnvironmentObject. We will use it to improve a sample project and take advantage of it when working in the preview and writing unit tests. Overview 00:00 Introduction 02:02 Coding example with bad practice 09:48 How does Model - View Model - Model work ⭐️ 12:47 MVVM with SwiftUI: State management and data flow ⭐️ 26:02 Recoding our coding example to use MVVM 35:58 Advantage of MVVM: dependency injection and showing different states of the view model in the preview 40:56 Adva

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later