Mikołaj Kąkol
03/31/2021, 10:15 AMModifier
that is passed to compose function. What the idea there? Should it be passed to first composable function, or to most inner function? Should we treat it like layoutparams
, so it’s for the most outer composable? Is it okay to pass multiple Modifiers
to different composables?Javier
03/31/2021, 11:15 AMmatvei
03/31/2021, 12:08 PMMikołaj Kąkol
03/31/2021, 1:13 PMmatvei
03/31/2021, 1:15 PMMikołaj Kąkol
03/31/2021, 1:17 PMmatvei
03/31/2021, 1:18 PMMikołaj Kąkol
03/31/2021, 1:22 PMmatvei
03/31/2021, 1:38 PMonUnderTextClick : () -> Unit
or smth. What we consider an anti pattern is when you have more than 1 modifier for one child, because you want to customize more than one part of the component from the parent.
Usually it's a sign that the child is not a self-contained element and it can be either more opinionated about its functionality or can be split into >1 pieces.Mikołaj Kąkol
03/31/2021, 2:00 PM