If you enjoy my teaching/presentation style, I've started creating my own courses at seanallen.teachable.com. You can watch the first ~10% of each course for free to get a feel for them.
I like to think of @state as state of matter of water in a glass. The water can be a solid, liquid, or gas but it’s still the same water/ source truth. Usually a glass of water is private to you drinking it and depending on the what you do like go outside in the cold or placing it on a hot stove, the water can change state but it’s still same thing. When you go back inside or take the cup off the stove the ice, steam/view is destroyed and water defaults back to liquid.
Nice vid, are you going to be diving any deeper into State? Such as what it is behind the scenes, wrappedValue, projectedValue etc? You explain things so well, that would be a nice vid coming from you
Potentially in the future. This video was aimed at those that are just getting started with SwiftUI and need to basics. A more involved video could come in the future.
@State is a View local variable for you, what do you use for app global storage? For night/day-mode I assume you make persistance related to some login credential? or do you persist for the current installation of your app only?
Hi Sean, Been following the channel for a while now, wondered if my entry into the industry is overkill I’ll be recreating Twitter Instagram Facebook Tinder & TikTok With Fire base Backend for my Portfolio and building each in Objective-C and Swift (UIKit Programmatic) Would I need anything else? Kind regards
If you enjoy my teaching/presentation style, I've started creating my own courses at seanallen.teachable.com. You can watch the first ~10% of each course for free to get a feel for them.
I like to think of @state as state of matter of water in a glass. The water can be a solid, liquid, or gas but it’s still the same water/ source truth. Usually a glass of water is private to you drinking it and depending on the what you do like go outside in the cold or placing it on a hot stove, the water can change state but it’s still same thing. When you go back inside or take the cup off the stove the ice, steam/view is destroyed and water defaults back to liquid.
Thanks for that! Pretty good way to retain the info
Like how you delve into the topic, keep up the good work. The whole world is looking at you 🤚🏻👍🏻
Oh thank you for this! Apple should link to these videos from their documentation :)
Thanks for the kind words 😀
How I understood We can use @State only with structs. And we need @State to make a private variable on that view.
You made it so simple and clear, thanks!
Nice vid, are you going to be diving any deeper into State? Such as what it is behind the scenes, wrappedValue, projectedValue etc?
You explain things so well, that would be a nice vid coming from you
Potentially in the future. This video was aimed at those that are just getting started with SwiftUI and need to basics. A more involved video could come in the future.
It would be cool if you can showcase some of your audiences' squarespace websites one day.
@State is a View local variable for you, what do you use for app global storage? For night/day-mode I assume you make persistance related to some login credential? or do you persist for the current installation of your app only?
Okay that makes a lot of sense, but how then would I use @StateObject? and @Published?
I am in a @State of awe.
How different is @State compared to UserDefaults in UIKit.
Can you explaining the @Binding property wrapper
very helpful
Glad to hear that
Great explanation
Well done. Thanks
Thanks Sean
Hi Sean,
Been following the channel for a while now, wondered if my entry into the industry is overkill
I’ll be recreating Twitter Instagram Facebook Tinder & TikTok With Fire base Backend for my Portfolio and building each in Objective-C and Swift (UIKit Programmatic)
Would I need anything else?
Kind regards
great explanation