Can Korkmaz
02/16/2022, 4:29 PMLaunchedEffect(key1 = true) { sharedViewModel.getAllTasks() }
val allTasks by sharedViewModel.allTasks.collectAsState()
This is from Stevdza's course. How can he be sure that getAllTasks() will have completed (fetched all tasks from room) before the second line.Joffrey
02/16/2022, 4:31 PMby
means that allTasks
property access will be delegated, so getAllTasks()
doesn't need to be completed before that line from what I can see here.Can Korkmaz
02/16/2022, 4:35 PM