Gonzalo Renedo
11/08/2022, 1:43 PMcould someone help me understand why this happens in recomposition count? It happens to me in all apps, I think it's an android bug
robercoding
11/08/2022, 1:50 PMrobercoding
11/08/2022, 1:51 PMGonzalo Renedo
11/08/2022, 5:40 PMrobercoding
11/08/2022, 6:08 PMelevation = null
That happens because it implements DefaultButtonElevation
and this listens for any interactionSource
changes, so when you press it/release/hover, it's doing some kinda of animation and applying it to the box elevation inside button
I don't think is something you should worry, nevertheless good question though 🙂robercoding
11/08/2022, 6:09 PMGonzalo Renedo
11/08/2022, 8:19 PMGonzalo Renedo
11/08/2022, 8:19 PMGonzalo Renedo
11/08/2022, 8:20 PMGonzalo Renedo
11/08/2022, 8:20 PMGonzalo Renedo
11/08/2022, 8:25 PMGonzalo Renedo
11/08/2022, 8:25 PMGonzalo Renedo
11/08/2022, 8:25 PMGonzalo Renedo
11/08/2022, 8:25 PMGonzalo Renedo
11/08/2022, 8:26 PMrobercoding
11/08/2022, 8:26 PMGonzalo Renedo
11/08/2022, 8:26 PMGonzalo Renedo
11/08/2022, 8:27 PMrobercoding
11/08/2022, 8:29 PM¿Es correcto tener eso asà y que se recomponga cuanto le plazca?I'm not sure about that, maybe it's not possible to skip
Composition
phase, I haven't dig it up too much there. But recomposition is not bad, just I would forget about it unless you think it's costing you performance in your app, which I don't think it's the caseGonzalo Renedo
11/08/2022, 8:32 PMc'mon, actually, I've done exactly what you told me (elevation = null).
The problem is this: if I'm optimizing my jetpack compose app and I need to know how many times elements are recomposed, leaving this free might seem a bit confusing.
robercoding
11/08/2022, 8:37 PMButton
scope, so it won't recompose any other parts of the approbercoding
11/08/2022, 8:38 PMGonzalo Renedo
11/09/2022, 1:48 AMAbdelilah El Aissaoui
11/11/2022, 2:49 PM