You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This allows for using a binding to a value and reading the value. Currently this behavior is not supported in Tokamak. In the example above, I get an error on $direction in saying
Cannot use property wrapper projection parameter
This isn't a big issue since you can technically use a ForEach on the count and index into the collection, but would be a nice to have!
Expected behavior
Using a binding would work in the above code snippet.
Desktop (please complete the following information):
OS: macOS 12.6
Browser: Safari
Version of the browser: 16
Version of Tokamak: 0.11.0
Thanks!
The text was updated successfully, but these errors were encountered:
The reason is that State must declare init(projectedValue: Binding<Value>).
Property wrappers can enable passing a projected-value argument to a property-wrapped parameter by declaring var projectedValue, and implementing an init(projectedValue:) that meets the following requirements: [...]
Describe the bug
In SwiftUI 3, support was added for using a binding of an element in a collection.
This allows for using a binding to a value and reading the value. Currently this behavior is not supported in Tokamak. In the example above, I get an error on
$direction in
sayingThis isn't a big issue since you can technically use a ForEach on the count and index into the collection, but would be a nice to have!
Expected behavior
Using a binding would work in the above code snippet.
Desktop (please complete the following information):
Thanks!
The text was updated successfully, but these errors were encountered: