Jilles van Gurp12/17/2020, 4:32 PM
I solved it in my store by also putting the value in a private variable but that feels a bit ugly. Would it be possible to make this more consistent/less flaky?
update("xx") println(current) // prints old value update("yy") delay(1000) println(current) // prints yy
Jan Weidenhaupt03/02/2021, 7:26 PM
, because the internal data only gets updated, when the
flow get collected (rendered or watched). Therefore you should avoid using
. Instead use the
flow and the functional-way it is more safe 😉 Sometimes it's easier to get the
value directly, that is why we left this possibility open, but then you must be sure that your data gets updated before correctly.