NEVER Confuse @State vs @Binding Again || SwiftUI Property Wrappers

  Переглядів 6,076

AppStuff

AppStuff

День тому

What's the difference between @State vs @Binding property wrappers? When do you use one vs the other? Find out in this video!
🔴 Become a member to access Exclusive Content :
www.stephancodes.com/blank-page
🖥️ ONLINE COURSES & APPS
👉 FREE UBER SwiftUI Course
• 🔴 Let's Build UBER wit...
👉 iOS App Templates:
www.stephancodes.com/shop
👉 FREE Twitter SwiftUI Course
• 🔴 Let's Build Twitter ...
👉 Pro Courses:
www.stephancodes.com/videos
🕐 TIMESTAMPS:
00:00 - Intro
00:26 - State Properties
02:00 - State Property Example
06:23 - Binding Properties
10:15 - Binding Property Example
15:43 - Another Binding Example
18:20 - Outro

КОМЕНТАРІ: 38
@lolrie
@lolrie 28 днів тому
Thank you so much - this is the best explanation I've found, very easy to understand and love the way you simplify the concept and give concrete examples.
@abudihadi3584
@abudihadi3584 11 місяців тому
from today and over you are my prof
@mohanad0408
@mohanad0408 6 місяців тому
Best explanation I found so far. What I like the most about your approach is mixing infographics while explaining. Please keep it up!
@ikshitchaudhari2529
@ikshitchaudhari2529 Рік тому
happy to see you back again !! you are probably the best IOS coach on youtube!
@911lalala
@911lalala Рік тому
Your lectures have changed my Life! Thank you so much My Hero
@gmostafaali
@gmostafaali Рік тому
Very high quality content, completely understood. Thanks a lot.
@Top_Moorhouse
@Top_Moorhouse 8 місяців тому
Great video! You made it simple to understand with good examples. Thanks! Now Subscribed...🤩
@galavarezzzk3610
@galavarezzzk3610 2 місяці тому
Thanks for the video!
@evrimdemir1327
@evrimdemir1327 2 місяці тому
Great tutorial. Thanks.
@nickmuir8175
@nickmuir8175 9 місяців тому
Absolutely killer vid, thanks
@timothyandrian
@timothyandrian 2 місяці тому
Nice explanation, Thanks a lot
@user-a_fellow_traveler
@user-a_fellow_traveler Рік тому
Very useful and simple explanation thanks
@jeanchristopherozner
@jeanchristopherozner Місяць тому
Very nice, merci!
@phongho.design
@phongho.design 9 місяців тому
thanks you so much ❤
@BUdJohnson242
@BUdJohnson242 Рік тому
This is awesome. Thanks for sharing your knowledge. One suggestion for improving the video would be to expand the Xcode interface to fill the screen or increase the font size, as small text can be difficult to read for viewers with visual impairments.
@mario_luis_dev
@mario_luis_dev 9 місяців тому
that was quality content man, thanks for the awesome explanations
@thejaplong
@thejaplong 11 місяців тому
I love you videos: your teaching method is great .... ...however the stereo music at the start almost gives me a headache i think it would be fine if not stereo... i always listen with a headset do as not to both my hubby Just to let you know...Judy oh, i just read the comment below, larger font would really help me too : ) thanks for your tutorials!
@coffeecodecreatine4158
@coffeecodecreatine4158 Рік тому
Keep making videos man! I have been teaching myself swift, and this video was super helpful.
@marcoalonsoiosdev
@marcoalonsoiosdev 10 місяців тому
Very useful thanks 🙏🏼
@rahmonali7
@rahmonali7 Рік тому
I got more knowledge from this aswesome video. Thank you so much!
@nishantkumar2194
@nishantkumar2194 7 місяців тому
❤ simple
@yaserghananwi
@yaserghananwi 7 місяців тому
thank you nice tutorial
@LukePighetti
@LukePighetti Рік тому
17:42 what’s the idiomatic way to handle deeply passed binding vars. For example, putting darkModeEnabled at to top of the view hierarchy and maybe ten constructors down are using it
@sanjarasanov4991
@sanjarasanov4991 Рік тому
awesome, thanks
@lumi6394
@lumi6394 Рік тому
Really nice explanation, thank you
@appstuff5778
@appstuff5778 Рік тому
You are welcome!
@garywkfung
@garywkfung Рік тому
This is awesome thanks! But can you explain how you would set new values to the binding if it is not a Bool? Say a string. Compiler won’t let me.
@oskarrhythm
@oskarrhythm 11 місяців тому
Thanks for the explaining but why when you change the value binding on the dismiss button doesnt change the color to white line 24-25 Text? so the if for that propouse dont know about that change? how can refresh the whole view?
@AbdeliOS
@AbdeliOS Рік тому
I like how you explain these concepts, can you make a tutorial about async await?
@appstuff5778
@appstuff5778 Рік тому
I have one! It’s my ‘Network Like A Pro’ video
@LukePighetti
@LukePighetti Рік тому
12:55 when you dismiss the drawer by swiping down, how do you show it again declaratively? Do you have to cycle the showDrawer to false and then true?
@nickmuir8175
@nickmuir8175 9 місяців тому
For anyone else confused about the relationship between the @State property on ContentView and the @Binding property on Detail View, it's worth noting that even though they're bound they are not the same property and can be named independently for e.g struct ContentView: View { @State private var showDetailViewContentView = false ... struct DetailView: View { @Binding var showDetailViewDetailView: Bool ... Then passed in as such .fullScreenCover(isPresented: $showDetailViewContentView, content: { DetailView(showDetailViewDetailView: $showDetailViewContentView) }) Not that you'd ever want to do it this way, but for me realising this helped visualise the handing off of data from one view to another where the property names are the same, something I personally struggle with.
@raychen4458
@raychen4458 Рік тому
Amazing explanation bro, hope you can create more courses on Udemy as well.
@appstuff5778
@appstuff5778 Рік тому
I’m mostly putting courses on my website now. Udemy will be courses with a limited feature set. My site will contain the course with the full feature set. I recommend just buying straight from my site
@JosefGooch
@JosefGooch Рік тому
Can this be implemented on any app, anywhere in terms of a new swiftUI project ?
@appstuff5778
@appstuff5778 Рік тому
Yes!
@chezchezchezchez
@chezchezchezchez 8 місяців тому
Awesome for me! (noob)
@alexaverin2941
@alexaverin2941 Місяць тому
great video, but please stop speaking only to my right ear :( maybe go for mono?
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
Эффект Карбонаро и устройство для распаковки
01:00
История одного вокалиста
Переглядів 2,1 млн
Пескоструйный АППАРАТ! #shorts
01:00
Гараж 54
Переглядів 3,1 млн
ЧТО ДЕЛАТЬ, ЕСЛИ НЕ ХВАТАЕТ ДЕНЕГ НА ВОССТАНОВЛЕНИЕ ТАЧКИ?
47:52
What most devs don't get about declarative code (I didn't either)
5:44
Joshua Morony
Переглядів 18 тис.
State & Binding | SwiftUI in 5 minutes | 2020
4:44
Krass Iankov
Переглядів 14 тис.
How to Code Pool in JavaScript
11:30
Fast Coding Tutorials
Переглядів 1,9 тис.
Most overpowered way to build mobile apps?
8:33
Beyond Fireship
Переглядів 677 тис.
Data Flow in a SwiftUI App
33:15
CodeWithChris
Переглядів 51 тис.
SwiftUI - @State Property Wrapper Explained
4:31
Sean Allen
Переглядів 16 тис.
Learn the Essentials of Swift in one hour
58:14
Paul Hudson
Переглядів 164 тис.
Result of the portable iPhone electrical machine #hacks
1:01
KevKevKiwi
Переглядів 8 млн
Опасная флешка 🤯
0:22
FATA MORGANA
Переглядів 735 тис.
Vortex Cannon vs Drone
20:44
Mark Rober
Переглядів 13 млн