Update the template screen to use the new(ish) Observation framework. (#4077)

* Update the template screen to use the new(ish) Observation framework.

* Add a variant of deferFulfillment that supports observables.

* Update snapshot fulfilment to work with either a publisher or a stream.
This commit is contained in:
Doug
2025-04-30 16:49:23 +01:00
committed by GitHub
parent 0620bd45fc
commit 61a427b8e5
12 changed files with 297 additions and 25 deletions
@@ -16,6 +16,8 @@ enum TemplateScreenViewModelAction {
struct TemplateScreenViewState: BindableState {
var title: String
var placeholder: String
var counter = 0
var bindings: TemplateScreenViewStateBindings
}
@@ -27,5 +29,8 @@ enum TemplateScreenViewAction {
case done
case textChanged
case incrementCounter
case decrementCounter
// Consider adding CustomStringConvertible conformance if the actions contain PII
}