Today was a good day, though I’m not entirely sure that I could summarise what I learned. But I guess I should try.
SwiftUI uses structs
rather than classes and that seems to make for a huge performance benefit. That’s good. There are loads of modifiers available to use for views and the order that you put them in matters. I like conditional modifiers – though I still have an unfounded feeling that @State private var ...
is very precious and I shouldn’t use it too much. I think that comes from old school Javascript experience that left me feeling like you shouldn’t have too many event listeners otherwise performance would take a big hit.
Views as properties and/or view composition seems like a no-brainer, and I’m pretty sure are the names for some of the things that I’ve been doing in SwiftUI prior to starting this course. Makes things more modular and gets a lot of code out of the var body: some View {
block.
I guess I did learn a few things. I’m still liking what I’m seeing here. Prior to starting the course, I felt like it was a small gamble investing in SwiftUI. What if it wasn’t working out for Apple and they decided to ditch it and go with something else? Now that I’m starting to learn a bit about it, it feels forward looking. Let’s hope I’m right.