Skip to content
Discussion options

You must be logged in to vote

You can also always create a local @Bindable store for deriving Bindings from:

class VC: UIViewController {
  @UIBindable var store: StoreOf<Feature>

  func buttonTapped() {
    @Bindable var store = store
    $store.property // Binding<…>
  }
}

That's pretty similar to what one does in SwiftUI when you have an @Environment model and you do @Bindable var model in the view to then get bindings from it.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@zachwaugh
Comment options

Comment options

You must be logged in to vote
1 reply
@zachwaugh
Comment options

Answer selected by zachwaugh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants