@Composable
fun Root() {
Scaffold(
floatingActionButton = {
FloatingActionButton(onClick = {}) {
Icon(Icons.Filled.Favorite)
}
}
) {
Child()
}
}
@Composable
fun Child() {
var textField1 by remember { mutableStateOf("") }
TextField(value = textField1, onValueChange = {textField1 = it})
val validateAndMakeNetworkRequest = {
}
}
How can I call validateAndMakeNetworkRequest from floating action button without state hoisting?
The code above just example, Child composable could be very deep