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
@christianselig the tag type needs to exactly match the selection binding type—there's no implicit optional promotion