Skip to content

Instantly share code, notes, and snippets.

View daveharig's full-sized avatar
🎯
Focusing

Dave Harig daveharig

🎯
Focusing
View GitHub Profile
@burnoo
burnoo / Jetpack Compose two-way data binding.kt
Last active October 13, 2022 07:08
Jetpack Compose two-way data binding
private class MutableStateAdapter<T>(
private val state: State<T>,
private val mutate: (T) -> Unit
) : MutableState<T> {
override var value: T
get() = state.value
set(value) {
mutate(value)
}