Is it just me, or is "side effect" in Compose weirdly named? Usually, outside of compose world, side effect is kind of undesired behavior you would want to avoid.
f
Filip Wiesner
03/24/2023, 12:06 PM
I mean... that's pretty spot on. You also want to avoid SideEffects in Compose 😄 But sometimes you have to use them 🤷
l
leandro
03/24/2023, 2:42 PM
Not sure I'd go that far to say that "side effects" is something to be avoided. For sure in the context of pure functions, but without side-effects you likely will not have a very useful software.
For me it's about knowing where they happen, and potentially grouping them on specific parts of the system, so that the rest can be tested in an easier way
l
Loney Chou
03/24/2023, 5:35 PM
It's so common that people misunderstand "side effects". In short "side effects" do not imply bad things. They just come with "main effects" which are often what people desire, but it doesn't mean main ones are all good and side ones are all bad. Side effects can be good or essential sometimes.
c
Colton Idle
03/26/2023, 2:36 PM
I'm with Filip. I always thought sideEffects meant "youre doing something kinda bad". But maybe that mostly came from RxJava?
m
mgrazianodecastro
03/26/2023, 5:57 PM
yeah, the name is kind of: you're taking a medicine, but be aware of side effects