Tóth István Zoltán
02/20/2025, 8:46 AMclass Config(
@Adaptive
val fragmentFun : () -> Unit
)
@Adaptive
fun someFun(@Adaptive : f : () -> Unit) {
f()
}
@Adaptive
fun useRef(config : Config) {
someFun(config.fragmentFun)
}
So, you can store and use references to adaptive functions and this supports full reactivity (I hope 😄 ).
I think I want to add calling the references directly (config.fragmentFun()
), but that can wait a bit.
There are some links to examples in the docs: https://github.com/spxbhuhb/adaptive/blob/main/doc/tutorials/foundation.md#function-references