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

david.vavra

10/25/2019, 6:23 PM
Hi, beginner question: What's the meaning of '+' in Jetpack Compose? For example in
+vectorResource(R.drawable.ic_face_primary_24dp)
. When it should be used and when not? Couldn't find it in the tutorial or ADS talks.
f

Fudge

10/25/2019, 6:24 PM
It’s to do with the ‘effect’ system and it’s getting removed
Right now it’s an easy way to convert from an effect to something you can work with iirc
d

david.vavra

10/25/2019, 6:25 PM
Thanks
w

wasyl

10/25/2019, 7:00 PM
I was told today
+
is analogous to
@Model
on the class — it tells Compose to treat this call different than simple function calls
a

Adam Powell

10/25/2019, 7:47 PM
+
is kind of like an operator invoke for effects. The functions that return effects just return an object for the effect and the
+
says, "add it into the composition here"
and yeah they're being made to behave more like composable functions in the future
2 Views