SwiftUIObservableDemo
This Repository is a demo of SwiftUI iOS 17 Observable macro. This includes two sample projects:
- ObservableDemo: This project demonstrates the use of @Observable macro in SwiftUI. It includes prior iOS 17 code using
ObservableObject
and then show cases the new@Observable
macro. - ObservableConsole: A console mac app that demonstrates how observable generally works by show casing the usage of
withObservationTracking
global function.
These sample projects were part of a demo for Kodeco accelerator bootcamp for iOS.
For more details on Observable changes in iOS 17, please check out Discover Observation in SwiftUI sessions from WWDC23