Zach built Android apps, platforms, and knowledge at Square for over six years before joining Google to work on Compose. Come say hi on Kotlin slack!
Zach Klippenstein
Composer at Google
Deriving derived state: derivedStateOf explained
Jetpack Compose’s state library has a powerful but tricky tool in derivedStateOf. Much of the time you don’t need it at all. It’s deceptively expensive to use and complex to implement. To find out why we’ll derive it from first principles. Starting with the simplest solution for a typical use case, we’ll walk through how different parts of the snapshot state system can be leveraged to improve the solution, eventually ending up at derivedStateOf.