When you define a variable in a SwiftUI struct, for example, `var name = "Amos"`, it will behave like a constant. So, you cannot change it later. To make a struct's variable mutable (changeable) in SwiftUI, you should use the @State Property Wrapper. In this video, you will discover how that works.
We will use SwiftUI to demonstrate this example because it is more fun to learn and understand Swift concepts using SwiftUI 🤪.
Learn Further
Join to learn more on UDEMY:
SwiftUI Animations: hhttps://www.udemy.com/course/swiftui-...
SwiftUI Design Foundations: https://www.udemy.com/course/swiftui-...
GitHub
https://github.com/amosgyamfi/open-sw...
Twitter:
/ amos_gyamfi