Skip to content

Commit fc2ae1d

Browse files
committed
Add projectValue to Binding for parity with State
1 parent 3394dcc commit fc2ae1d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/SwiftCrossUI/State/Binding.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ public class Binding<Value> {
1212
}
1313
}
1414

15+
public var projectedValue: Binding<Value> {
16+
// Just a handy helper so that you can use `@Binding` properties like
17+
// you would `@State` properties.
18+
self
19+
}
20+
1521
/// The stored getter.
1622
private let getValue: () -> Value
1723
/// The stored setter.

0 commit comments

Comments
 (0)