Add support for Swift Observation #9

Open
opened 2025-10-14 15:43:16 -06:00 by navan · 0 comments
Owner

Originally created by @DandyLyons on 10/23/2024

It looks like SwiftTUI is only able to support view models on macOS, since @ObservedObject is only available on macOS.

If we supported language level Swift Observation, then SwiftTUI should be able to support view models on any platform.

It looks like it should be feasible to implement using a strategy similar to that found in View+Observable.swift.

*Originally created by @DandyLyons on 10/23/2024* It looks like SwiftTUI is only able to support view models on macOS, since @ObservedObject is only available on macOS. If we supported language level Swift Observation, then SwiftTUI should be able to support view models on any platform. It looks like it should be feasible to implement using a strategy similar to that found in [View+Observable.swift](https://github.com/rensbreur/SwiftTUI/blob/main/Sources/SwiftTUI/PropertyWrappers/View%2BObservableObject.swift).
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/SwiftTUI#9
No description provided.