https://kotlinlang.org logo
#compose
Title
# compose
l

Lisandro Di Meo

07/28/2022, 2:31 PM
Hello folks, I was reading the following code from the documentation (link): And my question is if inside a composable i want to be aware of bottomBarTabs changes, it should be observed as state? or should I use another mechanism?
Copy code
class MyAppState(
    val scaffoldState: ScaffoldState, ....
) { val bottomBarTabs = /* State */ /*other stuff*/}
@Composable
fun rememberMyAppState(
    scaffoldState: ScaffoldState = rememberScaffoldState(),
    /* ... */
) = remember(scaffoldState, navController, resources, /* ... */) {
    MyAppState(scaffoldState, navController, resources, /* ... */)
}
2 Views