Created
October 17, 2022 13:36
-
-
Save ch8n/6f1b52a31c325165b99f050fbd225927 to your computer and use it in GitHub Desktop.
state and mutable state delegates
This file contains hidden or 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
inline operator fun <T> State<T>.getValue(thisObj: Any?, property: KProperty<*>): T = value | |
inline operator fun <T> MutableState<T>.setValue(thisObj: Any?, property: KProperty<*>, value: T) { | |
this.value = value | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment