Tag: macros
All the articles with the tag "macros".
SwiftUI: @State is a macro
Published: at 12:04 PMWith Xcode 27, SwiftUI @State transitioned from a property wrapper to a Swift macro. Discover how this under-the-hood rewrite fixes long-standing initialization bugs, manages nodes in the Attribute Graph, leverages DynamicProperty injection, and changes how view invalidation actually works.
SwiftUI: Observable macro under the hood
Published: at 01:44 PMExplore how the @Observable macro works under the hood in SwiftUI: compile-time transformations, access tracking, fine-grained re-renders, and how Observation replaces ObservableObject and Combine.