I have an issue whereby returning a reference to the composable function is interpreted as invoking the composable function resulting in the compiler throwing the following warning message:
Functions which invoke @Composable functions must be marked with the @Composable annotation. I understand that composable functions can only be invoked inside functions with composable context, however in this case i am just trying to get a reference to the function and not invoking it. In the code snippet below, content.value throws the warning message. Any ideas of how to fix this_._
private typealias ComposableUnitLambda = @Composable() () -> Unit
private val EmptyRoute: ComposableUnitLambda = {}
@Model
class ContentHolder(var value: ComposableUnitLambda = EmptyRoute)
@Navigator.Name("compose")
class ComposableNavigator : Navigator<Destination>() {
val current: ComposableUnitLambda
get() = content.value
}