I don't think you need to use @Binding for the value (@Binding var value: CGFloat). Bindings are used for two-way communication and you have one-way here. Just having let value: CGFloat would work the same.
Correct.
Actually I don't remember why I used @Binding last summer but SwiftUI changed a lot during the beta, maybe I had problems back then with a simple var and used Binding, then I forgot to check and update the project. That's one of the caveats of rushing to adopt a new framework :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't think you need to use @Binding for the value (
@Binding var value: CGFloat
). Bindings are used for two-way communication and you have one-way here. Just havinglet value: CGFloat
would work the same.Correct.
Actually I don't remember why I used @Binding last summer but SwiftUI changed a lot during the beta, maybe I had problems back then with a simple var and used Binding, then I forgot to check and update the project. That's one of the caveats of rushing to adopt a new framework :)