MVVM SwiftUI Tutorial - State Management and Data Flow through SwiftUI - Example Refactoring
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
1 view
85
16
3 years ago 00:45:54 1
MVVM SwiftUI Tutorial - State Management and Data Flow through SwiftUI - Example Refactoring
4 years ago 00:12:24 1
SwiftUI MVVM with ObservableObject & Published (Swift 5, Xcode 12, 2020) - iOS Development
4 years ago 00:44:31 3
Приложение с MVVM, COMBINE и SWIFTUI. Обзор на примере, архитектура - Mad Brains Техно
4 years ago 00:29:48 51
SwiftUI c нуля: урок 4 - Slider, ObservableObject, Published, Пишем плеер на MVVM
4 years ago 00:17:57 1
SwiftUI MVVM Programming with ObservableObject @Published @ObservedObject