https://kotlinlang.org logo
#compose
Title
# compose
m

Mahdi Safarmohammadloo

06/20/2022, 8:54 AM
simple question (Probably duplicate 😁) ! i have father and child compose function , i set a mutable state in father compose function , how can i change father state in child compose function ? (when i pass it as a parameter it is only readable)
f

Filip Wiesner

06/20/2022, 8:58 AM
Using a function/callback parameter. Something like
onClick
parametr on button.
❤️ 1
👍 1
k

kotlinforandroid

06/20/2022, 9:13 AM
if you want to read up on this, this is called state hoisting.
❤️ 1
👍 2
m

Mahdi Safarmohammadloo

06/20/2022, 9:16 AM
Thank you So MUCH ❤️😍 !!!!!!!!! @Filip Wiesner @kotlinforandroid
👌 1