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

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ก.ค. 2024
  • 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
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 42

  • @shubhamshetkar8785
    @shubhamshetkar8785 หลายเดือนก่อน +1

    Your teaching style is very easy to understand. This cleared my confusion very quickly. Thank you 🙏

  • @user-bw1tj3tu3e
    @user-bw1tj3tu3e หลายเดือนก่อน +1

    The best and hight quality content I ever seen, your channel will be the highly recommended to the beginners. After watching your knowledge sharing you deserve a like and subscribe 👍

  • @Minhaj_Aries
    @Minhaj_Aries หลายเดือนก่อน

    This has helped me building up my basics.. Keep it up. ❤

  • @caiohenriquesoares-zl6vg
    @caiohenriquesoares-zl6vg 2 หลายเดือนก่อน

    Finally I got! Thank you for that

  • @mohanad0408
    @mohanad0408 9 หลายเดือนก่อน +1

    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 ปีที่แล้ว +1

    happy to see you back again !! you are probably the best IOS coach on youtube!

  • @gmostafaali
    @gmostafaali ปีที่แล้ว +3

    Very high quality content, completely understood. Thanks a lot.

  • @911lalala
    @911lalala ปีที่แล้ว +1

    Your lectures have changed my Life! Thank you so much My Hero

  • @mario_luis_dev
    @mario_luis_dev 11 หลายเดือนก่อน

    that was quality content man, thanks for the awesome explanations

  • @evrimdemir1327
    @evrimdemir1327 4 หลายเดือนก่อน

    Great tutorial. Thanks.

  • @nickmuir8175
    @nickmuir8175 ปีที่แล้ว

    Absolutely killer vid, thanks

  • @BUdJohnson242
    @BUdJohnson242 ปีที่แล้ว +2

    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.

  • @galavarezzzk3610
    @galavarezzzk3610 4 หลายเดือนก่อน

    Thanks for the video!

  • @jeanchristopherozner
    @jeanchristopherozner 3 หลายเดือนก่อน

    Very nice, merci!

  • @coffeecodecreatine4158
    @coffeecodecreatine4158 ปีที่แล้ว

    Keep making videos man! I have been teaching myself swift, and this video was super helpful.

  • @marcoalonsoiosdev
    @marcoalonsoiosdev ปีที่แล้ว

    Very useful thanks 🙏🏼

  • @timothyandrian
    @timothyandrian 4 หลายเดือนก่อน

    Nice explanation, Thanks a lot

  • @sanjarasanov4991
    @sanjarasanov4991 ปีที่แล้ว

    awesome, thanks

  • @Top_Moorhouse
    @Top_Moorhouse 10 หลายเดือนก่อน +1

    Great video! You made it simple to understand with good examples. Thanks! Now Subscribed...🤩

  • @rahmonali7
    @rahmonali7 ปีที่แล้ว

    I got more knowledge from this aswesome video. Thank you so much!

  • @phongho.design
    @phongho.design 11 หลายเดือนก่อน

    thanks you so much ❤

  • @yaserghananwi
    @yaserghananwi 9 หลายเดือนก่อน +1

    thank you nice tutorial

  • @user-a_fellow_traveler
    @user-a_fellow_traveler ปีที่แล้ว

    Very useful and simple explanation thanks

  • @abudihadi3584
    @abudihadi3584 ปีที่แล้ว

    from today and over you are my prof

  • @lumi6394
    @lumi6394 ปีที่แล้ว

    Really nice explanation, thank you

  • @lolrie
    @lolrie 3 หลายเดือนก่อน

    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.

  • @thejaplong
    @thejaplong ปีที่แล้ว

    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!

  • @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

  • @nishantkumar2194
    @nishantkumar2194 9 หลายเดือนก่อน

    ❤ simple

  • @AbdeliOS
    @AbdeliOS ปีที่แล้ว +1

    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

  • @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.

  • @raychen4458
    @raychen4458 ปีที่แล้ว +1

    Amazing explanation bro, hope you can create more courses on Udemy as well.

    • @appstuff5778
      @appstuff5778  ปีที่แล้ว +4

      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

  • @oskarrhythm
    @oskarrhythm ปีที่แล้ว

    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?

  • @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 ปีที่แล้ว

    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.

  • @JosefGooch
    @JosefGooch ปีที่แล้ว +1

    Can this be implemented on any app, anywhere in terms of a new swiftUI project ?

  • @chezchezchezchez
    @chezchezchezchez 10 หลายเดือนก่อน

    Awesome for me! (noob)

  • @alexaverin2941
    @alexaverin2941 3 หลายเดือนก่อน

    great video, but please stop speaking only to my right ear :( maybe go for mono?