jim
09/08/2020, 1:27 AMclass ProfilePageState {
val scrollState1 = mutableStateOf<ScrollState>(ScrollState())
val scrollState2 = mutableStateOf<ScrollState>(ScrollState())
val scrollState3 = mutableStateOf<ScrollState>(ScrollState())
}
The parent can then create a ProfilePageState object without knowing anything about the implementation of the ProfilePage (all it knows is that a ProfilePage needs one of these ProfilePageState objects). We call this pattern "black box state" because the internals of the state object are a black box to the owner of the object.
Does that answer your question?