This project demonstrates various issues that can arise with recompositions in Jetpack Compose and how to solve them.
- Android Studio: Version 2024.1.1 Patch 2 (Koala) or later.
- Android SDK: Compile SDK version 34.
- Kotlin: Version 2.0.0.
- Gradle: Version 8.5.2.
-
Clone the repository:
-
Open the project in Android Studio.
-
Build the project:
- Use the
Build
menu in Android Studio or run./gradlew build
from the command line.
- Use the
-
Run the app:
- Use the
Run
button in Android Studio or run./gradlew installDebug
from the command line.
- Use the
- Unstable Class: Demonstrates issues with recompositions when using an unstable class.
- Unstable External Class: Shows how external classes can cause recomposition problems.
- Lambdas: Explains how lambdas can affect recompositions.
- LazyList: Discusses recomposition issues with
LazyList
. - Columns: Highlights problems with recompositions in columns.
- Continuously Changing State: Demonstrates issues with state that changes continuously.
- Modifiers: Shows how modifiers can impact recompositions.