
@State Made Easy
The problem SwiftUI views are structs, which means they’re lightweight and disposable. Every time something in your app changes, SwiftUI rebuilds parts of the UI from scratch. Without @State, any data inside the view would reset to its initial value every time it redraws, making it impossible to keep