Binding for @dynamicMemberLookup members #10
piterwilson
started this conversation in
General
Replies: 1 comment
-
|
Hey @piterwilson, what you're describing actually exists already in SwiftUI. The API is called BrowserTitleBarView(title: .constant(webViewStore.title))However you don't need to make variables in your View a Binding just to pass info in, you can just do Let me know if that helps! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @kylehickinson
I need to be able to pass the members created using
@dynamicMemberLookupsuch astitle,urland the rest as aBinding.I wanted to extract away the logic for a custom
Viewthat reacts totitle(for example).I found myself doing this because passing the member directly did not cause the custom
Viewto update:I am not an expert on SwiftUI. Is there a better way without creating the
extension?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions