dimsuz
07/06/2021, 10:08 AMval state = remember { ... }
and then below this line I have Column { Box { Column { Component(state) } } }
, does it make any difference (performance or memory-wise) to have this state closer to its usage, i.e. should I put it in the innermost lambda rather than have it outside? I mean in this case none of intermediate composable lambdas need this state and this is known to stay like this. But having it "outside" is sometimes better for organizational purposes.Filip Wiesner
07/06/2021, 10:45 AMdimsuz
07/06/2021, 10:48 AMManuel Vivo
07/06/2021, 11:31 AMval state by remember { mutableStateOf(…) })
aims for automatic better performance as that state is only read when it’s actually neededManuel Vivo
07/06/2021, 11:32 AM