Jan
10/06/2023, 8:00 AMIvan Matkov
10/06/2023, 8:32 AMJan
10/06/2023, 8:33 AMval uiState: InventoryComponentViewModel.UiState by component.uiState.collectAsState()
var selectedVenue by remember { mutableStateOf(uiState.selectedVenue) }
Pablichjenkov
10/06/2023, 1:12 PMJan
10/06/2023, 1:17 PMPablichjenkov
10/06/2023, 2:06 PMpositional memoization
Leland Richardson has a good talk about that. Basically remember works by keeping the initial value from one composition to another composition. Without a key, remember uses its position in the slot table to determine if it was existing in the previous composition. And if it matches, it will pick the previous composition value, ignoring the value you pass in the composable function parameter.