Mehdi Haghgoo09/07/2020, 5:48 PM
When a composable function is invoked, the invocation might occur on a different thread from the caller. That means code that modifies variables in a composable lambda should be avoided–both because such code is not thread-safe, and because it is an impermissible side-effect of the composable lambda. -link
Parallel execution in Compose is very new to me. Could someone tell me please how I can modify variables if I am not allowed to do it in a Composable lamda? Also, what does thread-safety mean in the above paragraph?
manueldidonna09/07/2020, 5:59 PM
This thread has been very useful to me https://kotlinlang.slack.com/archives/CJLTWPH7S/p1591653158447300?thread_ts=1591653158.447300&cid=CJLTWPH7S
sante09/07/2020, 8:01 PM