Recomposition Visualization is an application for visually understanding how Jetpack Compose works. It allows you to track recompositions and state changes in a clear way, similar to RxMarbles and FlowMarbles for data streams.
The app is available here.😎
- Kotlin
- Jetpack Compose Multiplatform
- FIR & IR API — used for code analysis and generation at the compiler level
./gradlew :composeApp:runOr
./gradlew :composeApp:hotRunJvm./gradlew :composeApp:jsBrowserDevelopmentRun --continuous./gradlew buildAppYou can contribute your own Compose examples to the project via Pull Requests. To add a new sample, follow these steps:
-
Create a sample class
In the packageru.ivk1800.sample, add a new class with the following structure:@Highlighted object MyAwesomeSample { @Composable fun EntryPoint() { // Your Compose code here } }
The class must be annotated with
@Highlighted. It must contain a methodEntryPoint()marked as@Composable. -
Register the sample in SampleDescriptor. Add a new enum entry for your sample:
MyAwesome( id = 16, entryPoint = { MyAwesomeSample.EntryPoint() }, sourceCode = { MyAwesomeSample.HighlightedSourceCode() }, title = Res.string.my_awesome_title, explanation = Res.string.my_awesome_explanation, good = null, ),
If your sample has two variants (“good” and “bad”), make sure to provide the good value.
-
Add string resources Add entries for the sample's title and explanation.
-
Submit a Pull Request 🏆.
gradlew dependencyGuard
gradlew dependencyGuardBaseline
