
Tech
SwiftUI’s @State Is Now a Macro - What It Means for You
TL;DR: SwiftUI’s `@State` is now exposed as a macro, but everyday usage stays almost the same. The biggest practical change is lazy initialization: class instances stored in `@State`, such as `@Observable` view models, are created once for the lifetime of the view’s state storage instead of being re-created whenever the view struct is rebuilt.
Read the full discussion on HackerNoon
This article was aggregated from HackerNoon. Click to join the conversation.
View on HackerNoon