Small addendum to my previous code question, how do I use an @​Observable as a binding if the object I want to bind is optional? In this case, the object might not be immediately available as it comes in async, but once it comes in, I want it selectable

This code compiles, but the selection is never saved

There's probably a better way to structure this too, in that case I'm all ears!

Gist: https://gist.github.com/christianselig/792257d1270f0c6dd3ebd9fde062ed51

icecreamobserving.swift

GitHub Gist: instantly share code, notes, and snippets.

Gist
Bindable | Apple Developer Documentation

A property wrapper type that supports creating bindings to the mutable properties of observable objects.

Apple Developer Documentation
@bwebster @christianselig this. And I just went through this same confusion. It’s very odd declaring a bindable inside a view body as a flow but solves the problem