I have a simple task for JS, and I have no idea how to make it using Swift. Help me please to understand and make this.
I need just check if state value is or not nil
, and disable the button.
Button(action: {onBoardingNav.goTo(step: 3)} ) {...}
.disabled($selectedLanguage != nil)
// Error: Type 'Binding<UUID?>' is not optional, value can never be nil
If
.disabled(selectedLanguage != nil)
did not work (notice no$
), then try.disabled($selectedLanguage.wrappedValue != nil)