Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jisungbin/ComposeInvestigator
Trace the recomposition of a Composable with its cause without boilerplate code 😎.
https://github.com/jisungbin/ComposeInvestigator
compose-compiler-plugin compose-runtime kotlin-compiler-plugin
Last synced: 3 months ago
JSON representation
Trace the recomposition of a Composable with its cause without boilerplate code 😎.
- Host: GitHub
- URL: https://github.com/jisungbin/ComposeInvestigator
- Owner: jisungbin
- License: mit
- Created: 2023-10-11T16:52:30.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-01T13:01:14.000Z (3 months ago)
- Last Synced: 2024-04-01T14:25:59.808Z (3 months ago)
- Topics: compose-compiler-plugin, compose-runtime, kotlin-compiler-plugin
- Language: Kotlin
- Homepage: https://jisungbin.github.io/ComposeInvestigator/
- Size: 597 KB
- Stars: 147
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Lists
- awesome-list - jisungbin/ComposeInvestigator - Trace the recomposition of a Composable with its cause without boilerplate code 😎. (Kotlin)
README
## ComposeInvestigator
Trace the recomposition of a Composable with its cause without boilerplate code 😎.
This tool was initiated for personal learning and has not been proven necessary for production.
However, it can perform the following tasks:- **Reports if a Composable is skipped during recomposition.**
- **Reports if the arguments of a Composable have changed and been recomposed.** It can also compare the
values before and after the change.
- **Reports if the state values inside a Composable have been modified.** It can also compare the values
before and after the change.
- **Retrieves the call stack leading up to the invocation of a Composable.** This helps identify the
specific Composable being recomposed when the same Composable is reused in multiple places.[*(Read the Medium's introductory post)*](https://jisungbin.medium.com/tracing-recompositions-without-boilerplate-code-e9800db1419e)
---
### Getting Started ![gradle-plugin-version](https://img.shields.io/maven-central/v/land.sungbin.composeinvestigator/composeinvestigator-gradle-plugin?style=flat-square)
Just add the plugin to your module-level Gradle like this:
```groovy
plugins {
id 'land.sungbin.composeinvestigator' version ''
}
```> [!IMPORTANT]
>
> ComposeInvestigator is heavily dependent on the version
> of [Compose Compiler](https://developer.android.com/jetpack/androidx/releases/compose-compiler),
> so the version of ComposeInvestigator follows the format `[Compose Compiler Version - ComposeInvestigator Version]`.
>
> In other words, you need to adjust the Compose Compiler version and Kotlin version to use ComposeInvestigator.
>
> It also depends slightly on the Compose Runtime and Compose Animation versions.
> The last tested versions are both `1.6.3`.Snapshots of the development version are available in Sonatype's snapshots repository.
```groovy
repositories {
// ...
maven {
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
}
}
```You don't need to use any APIs to get started. But if you're looking for a fancier experience,
consider using the runtime API.Comprehensive documentation for ComposeInvestigator is available
on [project website](https://jisungbin.github.io/ComposeInvestigator).### Preview
![image](https://github.com/jisungbin/ComposeInvestigator/assets/40740128/98991bd9-97f2-47a7-9cc9-6f9cd1cda0e3)