2
GitHub - bendgk/effekt: Kotlin reactive library (inspired by Vue.js)
source link: https://github.com/bendgk/effekt
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
EffeKt
Kotlin reactive library inspired by Vue.js. It seeks to provide reactive primitives to kotlin for building functionally coupled systems.
Usage
EffeKt brings the following reactive primitives from vue to kotlin:
Example
val a = ref(2)
val b = ref(3)
val c = computed { a.value + b.value }
watchEffect {
println("c: ${c.value}")
}
a.value = 10
b.value = 1000
b.value = -10
Output:
> c: 5
> c: 13
> c: 1010
> c: 0
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK