The recording of my talk from iOS Conf SG is now available on YouTube! In this talk I share 5 key ideas for building a SwiftUI mindset and show a few examples of what can go wrong in practice when SwiftUI principles are misunderstood: https://www.youtube.com/watch?v=Y_Ov-ddMb24
#SwiftUI #iOSDev
The SwiftUI Mindset: 5 Key Ideas to Avoid Common Pitfalls

YouTube

@natpanferova great talk, I just watched it (finally!)

You know it’s great ‘cause I took notes 🤭

@mipstian Yeah the closure one kills me though. Tough to deal with. Like… what does Button do? Aren’t all buttons constantly re-evaluated?

@marcpalmer I wouldn’t worry about APIs that *ask* for a closure 😅

But in practice when I pass a closure around it’s usually just calling into a model object, so I might as well pass the object around 🤷‍♀️

@mipstian no, but I’m interested in how performance is affected if you have e.g: lots of buttons or similar components. Every button benefitting from direct ref to a function in a view model is pretty painful. Some UIs can have upward of 100
@marcpalmer I still don’t know what a view model is! And afaict with SwiftUI, it’s for the best 😬