Created
November 10, 2022 19:09
-
-
Save hmlongco/8efe9c66ab8b38056e67a802881c491a to your computer and use it in GitHub Desktop.
Binding+variable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Binding { | |
public static func variable(_ value: Value) -> Binding<Value> { | |
var state = value | |
return Binding<Value> { | |
state | |
} set: { | |
state = $0 | |
} | |
} | |
} |
Author
hmlongco
commented
Nov 10, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment