I've just updated from 1.0.5 to 1.1.0-beta04 and i...
# compose
l
I've just updated from 1.0.5 to 1.1.0-beta04 and it looks like the elvis operator is no longer working within composables, does anyone know why that is? The second
Text
should be displayed but it isn't - as soon as I replace the elvis operator with an
if
statement then the second text is rendered correctly
z
This never worked for me. I also think that compose would treat the two text as different if you do it this way, so it's probably better to just use one text composable and derive the string with the Elvis operator.
4
l
@Zoltan Demant This is just a simple example, in our production app we use this type of logic for rendering different components and it has been working fine. The
let
logic with the elvis operator works in 1.0.5 and below and has been working for months, only after upgrading did it stop working. The problem is that the second condition is NEVER evaluated when using
let
, which is incorrect
👍🏽 1
👍🏽 1