Have you noticed that SwiftUIโ€™s alert API is strange? It takes a Binding<Bool> *and* an optional value. What happens when true and nil are provided? Or false and some data??

Luckily it's easy to derive a Binding<Bool> from a Binding<T?> to keep your domain concisely modeled. ๐Ÿ‘‡

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/pointfreeco/statuses/115498687401667046 on your instance and quote it. (Note that quoting is not supported in Mastodon.)