Episode

SwiftUI’s @State Is Now a Macro - What It Means for You

Podcast
Programming Tech Brief By HackerNoon
Published
Jun 29, 2026
Duration seconds
219
Processing state
not_requested
Canonical source
https://share.transistor.fm/s/8cfc6592
Audio
https://media.transistor.fm/8cfc6592/6582aa90.mp3
JSON
/v1/public/podcasts/programming-tech-brief-by-hackernoon-6364125/episodes/swiftui-s-state-is-now-a-macro-what-it-means-for-you
Markdown
/podcast/programming-tech-brief-by-hackernoon-6364125/swiftui-s-state-is-now-a-macro-what-it-means-for-you.md

Actions

  • POST https://stenobird.com/v1/public/podcasts/programming-tech-brief-by-hackernoon-6364125/episodes/swiftui-s-state-is-now-a-macro-what-it-means-for-you/transcription-requests
    Idempotently request low-priority transcript generation for this episode.
  • GET https://stenobird.com/podcast/programming-tech-brief-by-hackernoon-6364125/swiftui-s-state-is-now-a-macro-what-it-means-for-you.md
    Read the agent-friendly Markdown representation of this episode resource.

Summary

This story was originally published on HackerNoon at: https://hackernoon.com/swiftuis-state-is-now-a-macro-what-it-means-for-you . SwiftUI’s @State is now exposed as a macro. Learn what changed, how lazy initialization works, and how to use @State with @Observable models. Check more stories related to programming at: https://hackernoon.com/c/programming . You can also check exclusive content about #swift , #swiftui , #ios-app-development , #ios-development , #swift-programming , #apple , #swift-changes , #hackernoon-top-story , and more. This story was written by: @element . Learn more about this writer by checking @element's about page, and for more stories, please visit hackernoon.com . 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.