Md Sohail
09/18/2023, 6:53 AMQamar Khan
09/18/2023, 6:55 AMMd Sohail
09/18/2023, 6:57 AMQamar Khan
09/18/2023, 6:58 AMChrimaeon
09/18/2023, 6:58 AMMd Sohail
09/18/2023, 6:59 AMvar playedQuiz = listOf<PlayedQuizModel>()
Chrimaeon
09/18/2023, 7:00 AMQamar Khan
09/18/2023, 7:01 AMMd Sohail
09/18/2023, 7:02 AMMd Sohail
09/18/2023, 7:03 AMChrimaeon
09/18/2023, 7:04 AMChrimaeon
09/18/2023, 7:05 AMMd Sohail
09/18/2023, 7:06 AMxoangon
09/18/2023, 9:51 AM@Composable
function is re-composed. To achieve the same approach as the class property, you'd use a remember
block to tell the compiler to save that value accross recompositions and not re-execute that code.
However, if what you want is to log each time that function is recomposed, then you should use a DisposableEffect
(I don't see the need for a LaunchEffect
here)mattinger
09/18/2023, 6:12 PMefemoney
09/18/2023, 7:16 PM