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

elye

01/13/2022, 12:43 PM
Is it possible to make a passed in variable (i.e. MutableState) still a delegate, so I can assign to the value directly (instead of using the
.value
)? More info on my question on https://stackoverflow.com/questions/70696585/can-we-still-use-the-variable-delegate-for-variable-pass-through-parameter
d

Dmitrii Smirnov

01/13/2022, 2:16 PM
you are trying to break Single Source of Truth principle more info on my answer :)
👍 2
z

Zach Klippenstein (he/him) [MOD]

01/13/2022, 3:49 PM
I don't think passing a mutable state and changing it from a function breaks single source of truth - that state object is still the single source of truth. It’s still an anti pattern, but not for that particular reason.
🤔 1