How to use EnvironmentObject in SwiftUI (SwiftUI Tutorial, SwiftUI Data Flow)

preview_player
Показать описание
In this SwiftUI tutorial, we’ll be looking at an interesting topic in SwiftUI and one of the SwiftUI basics, SwiftUI Data Flow. We’ll start of in this video looking at how to use @EnvironmentObject Property Wrapper in SwiftUI, discuss best practises for when to use the @EnvironmentObject Property Wrapper in SwiftUI & also some other tips from Apple.

Well let’s jump into this swiftui tutorial to find out the answer all your questions.

Mastering Stacks in SwiftUI (VStack, HStack, LazyStacks, SwiftUI Tutorial)

Firebase SwiftUI Login, Registration, Password Reset & Session Management with Combine

Setup SwiftUI App with Firebase SPM (Swift Package Manager, SwiftUI Tutorial, Firebase Crashlytics)

Getting Started with Combine (Practical Combine Framework Examples in UIKit & SwiftUI)

SwiftUI Form Validation using Combine (SwiftUI Tutorial, Regular Expressions, Combine Framework)

Build a news app in SwiftUI tutorial series

Build Onboarding Screens in SwiftUI (TabView, PageTabViewStyle, SwiftUI Tutorial, @AppStorage)

SwiftUI Redacted Tutorial - Loading Skeleton View - (SwiftUI Tutorial, Xcode 12, SwiftUI 2.0)

Build Clubhouse in SwiftUI 2.0 and Dark Mode (SwiftUI Tutorial, SwiftUI 2.0, Clubhouse App Clone)

Dark Mode in SwiftUI using @Binding & @AppStorage (SwiftUI Tutorial, @Binding, @AppStorage)

#tundsdev #swiftuiobservedobject #whatisobservedobjectswiftui #swiftuipropertywrappers #swiftuibasics
Рекомендации по теме
Комментарии
Автор

Great breakdown of @EnvironmentObject. Thank you!

iOSDevHeath
Автор

Good video. It cleared up a lot of confusion for me.

hollisambrose
Автор

I wish you good luck on your channel. You surely have a good understanding and a clear method on teaching what you know. Good Luck.

hcri
Автор

This is super. Breaking everything down into these shorter videos and using a really simple counter as your example through this and some of the other videos meant I could pay more attention to how the data was being passed (instead of trying to understand the view or the view model itself)... thanks!

latch
Автор

I like how you skip out all the boring typing. Good stuff

monstrositylabs
Автор

Nice video again, I am seeing that Apple recommend almost every single view to be in a separate file and to have one contentview, which actually calls all of his elements. In such scenarios the usage of @observableobject really loses it's strength.

If I may give you a suggestion for a new video it would be for NavigationStack. Currently everyone is using it if you are going from a List and select a row and so on, but what if you are opening a new screen from a button and go multiple screens and have to use path (in order to have "popToRootVC", i.e. path = [])

slavihinkov
Автор

great work. How about CloudKit & iCloud notification . Regards

invenueapp