react-meets-swiftui
react-meets-swiftui copied to clipboard
Use conditional binding
It's better to you optional binding (https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html) instead of checking for nil
and then force unwrapping.
I somehow totally missed this. Thanks for the PR. This is good advice.
For some reason I didn't think optional binding actually worked in this context... Is this something new in a later version of SwiftUI? I haven't actually touched the last few betas
You may be right. Haven’t tried the latest betas myself. I assumed that if the nil check worked, the unwrapping would work as well.