I found the answer after watching the WWDC talk on DataFlow through swiftUI. @Binding is used to pass read/write data from one view to the other. @Binding can never be 'The source of truth'. It is just a reference to a 'source of truth' that already exists.'Source of truth' is the original data that the view refers to (. To create a 'source of truth' with read-only acces you can use plain swift properties in the view struct. (Or use @Environment). If you need read/write access you have two options1) @State. You can use this option when the data you are using is completely local to the view (Such as your scroll position) which has no meening in your model2) BindableObject. Use this when you have data in your model that the view needs to read and write to.So @Binding is only a bridge that connects existing sources of data such as @State or @ObjectBinding. It can also access other Bindings as well.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: