Implementing an animated column section header using Jetpack Compose - DEV Community dev.to/tkuenneth/implementin…
3
500
Two mutables don’t make a right - Zach Klippenstein - Why you shouldn't use mutable objects in your State holders dev.to/zachklipp/two-mutable…
6
842
How the Snapshot system works in compose. By Zach Klippenstein. A must.
dev.to/zachklipp/introductio…
5
533
“The Diffing Dilemma! All about diffing with LazyLists!” by Garima Jain
medium.com/google-developer-…
Custom Layouts with jetpack Compose (Deep Dive) - @AbhinavCh97
proandroiddev.com/custom-lay…
"How we reduced our Android startup time by 77" - @morfly_io, medium.com/turo-engineering/…
Such a great post from @Kaaveh_IO about debugging Compose.
Worked on a project where I noticed a LazyColumn being noticeable slow on scroll.
TL:DR, Marking a composable param class as `Immutable`. As it was containing a List type did the trick.
proandroiddev.com/debugging-…
Be careful when your composables receive collection types as parameters. Since they convert your composables to Unskippable, bad for performance.
developer.android.com/jetpac….
1
1
116
Well explained. How inline functions affect recompositions
🚀Recomposition in Jetpack Compose 2 🚀
🧵After my latest thread related recomposition, I had a time to investigate more and here is second part of recomposition series. ⬇️
1⃣ Recomposition definition again: Recomposition is the process of calling your composable functions again when inputs change.
and here is simple example
I think this part is straightforward:
*⃣ Click Button
*⃣ The count state increments.
*⃣ The change in count triggers the recomposition of our top-level Composable.
2⃣ Let's wrap our state within another Column composable and observe the logs:
Interestingly, even if the count state is defined in the Column, and there's no state within the Counter scope, the entire scope still recomposes. But why?⬇️
3⃣ Let's check the implementation of Column composable
The reason for the surprising recomposition behavior? Column is defined as an inline function with content passed as a lambda. For those unfamiliar with how inline functions process lambdas, let's remember together.
4⃣ Lambdas passed to inline functions are directly inlined (or incorporated) into the calling function. Post-compilation, it looks like this:
5⃣ Wrap-Up:
*⃣ In Jetpack Compose, Box, Row, Column, and ConstraintLayout are inline composables.
*⃣Content passed to these composables gets incorporated directly into the calling function, expanding the recomposition scope.
Being aware of this behavior helps in efficiently structuring your composables and preventing unintended recompositions.
🔥 Keep following for more on Jetpack Compose!
5
893
Jetpack Compose CompositionLocal - What You Need to Know by Neil Davies 👌link.medium.com/jITeZhrfSCb
4
524
Just published! "Using Version Catalogs from Gradle Precompiled Scripts with Kotlin DSL", #androidDev -
link.medium.com/xcTKwrMrxBb
Providing AssistedInject supported ViewModel for Composable using Hilt by @imShreyasPatil link.medium.com/Gb9kuMJTlpb
Rx to Coroutines Concepts, Part 4: Cold Flows - @billjings. Such a well written article.
code.cash.app/rx-to-coroutin…
2
Guide to app architecture - developer.android.com/jetpac… - @AndroidDev 👌
1
4
Notification trampoline restrictions-Android12 - link.medium.com/pT7kV30aWkb








