The @EnvironmentObject is a super-useful property wrapper that lets us put an observable object into the environment of our SwiftUI application. By doing this, all of these views in the view hierarchy will then have access to this object. This is the perfect solution for any case where you have a class that needs to be accessed by multiple views, but you don't want to manually bind it from view to view to view with initializers.
Next video: [ Ссылка ]
Last video: [ Ссылка ]
🤙 WELCOME BACK 🤙
WEBSITE: [ Ссылка ]
DISCORD: [ Ссылка ]
GITHUB: [ Ссылка ]
SAY THANKS: [ Ссылка ]
How to use @EnvironmentObject in SwiftUI | Bootcamp #51
Теги
SwiftUI BootcampLearn SwiftUISwiftUI Environment ObjectSwiftUI @EnvironmentObject@EnvironmentObjectWhat is @EnvironmentObjectEnvironmentObjectEnvironmentObject vs ObservedObjectSwiftUI what is Environment ObjectSwiftUI how to use environment object@EnvironmentObject SwiftUIWhat is @EnvironmentObject SwiftUISwiftUI Environment object vs observed object@EnvironmentObject not working@EnvironmentObject crashing@EnvironmentObject causing crash