Dec 29, 2022
If one state depends on another, you can use derivedStateOf, try to read about compose side effects (https://developer.android.com/jetpack/compose/side-effects)
For the second question, you can pass a state as argument of a Composable, check the links I put at the en of the article.