
Breaks down code into tree-structured, lifecycle-aware business logic components with routing and pluggable UI support. Offers clear UI/non-UI separation, dependency injection, state preservation, and custom navigation models.
Decompose is a Kotlin Multiplatform library for breaking down your code into tree-structured lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Jetpack/Multiplatform Compose, Android Views, SwiftUI, Kotlin/React, etc.).
Please see the project website for documentation and APIs.
Should you have any questions or ideas - there is Discussions section. Also welcome to the Kotlin Slack channel - #decompose! You can also try using DeepWiki!
kotlinx-serialization)Please check the Installation section of the documentation.
In general, Decompose supports the following targets: android, jvm, ios, watchos, tvos, macos, wasmJs, js. However, some modules do not support all targets or the support depends on the Decompose version. Please see the installation docs for details.
Here are some key concepts of the library, more details can be found in the documentation.
ViewModel) and back button handlingViewModel)Decompose is a library that can be used as a framework. In its core, Decompose just manipulates instances of ComponentContext with strict parent-child relationship, which is also called "navigation". The possibility of creating custom implementations of the ComponentContext interface allows adding custom properties and functions, as well as storing additional data in each instance of ComponentContext. This makes it a very powerful tool with various use cases.
The "component" term is just one of the possible usages, the recommended one. The Decompose-Router library is a great example of leveraging Decompose to create a custom navigation solution with a completely different API.
Please refer to the Quick start section of the docs.
Check out the Samples section of the docs for a full description of each sample.
Check out the template repository which may be used to kick-start a project for you.
Checkout a voluntary list of projects/companies using Decompose: https://github.com/arkivanov/Decompose/discussions/366. Feel free to add your project!
Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation
A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose - if you find Decompose verbose and would prefer something built on top of Compose.
"Component-based Approach" series by Artur Artikov
Twitter: @arkann1985
Decompose is a Kotlin Multiplatform library for breaking down your code into tree-structured lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Jetpack/Multiplatform Compose, Android Views, SwiftUI, Kotlin/React, etc.).
Please see the project website for documentation and APIs.
Should you have any questions or ideas - there is Discussions section. Also welcome to the Kotlin Slack channel - #decompose! You can also try using DeepWiki!
kotlinx-serialization)Please check the Installation section of the documentation.
In general, Decompose supports the following targets: android, jvm, ios, watchos, tvos, macos, wasmJs, js. However, some modules do not support all targets or the support depends on the Decompose version. Please see the installation docs for details.
Here are some key concepts of the library, more details can be found in the documentation.
ViewModel) and back button handlingViewModel)Decompose is a library that can be used as a framework. In its core, Decompose just manipulates instances of ComponentContext with strict parent-child relationship, which is also called "navigation". The possibility of creating custom implementations of the ComponentContext interface allows adding custom properties and functions, as well as storing additional data in each instance of ComponentContext. This makes it a very powerful tool with various use cases.
The "component" term is just one of the possible usages, the recommended one. The Decompose-Router library is a great example of leveraging Decompose to create a custom navigation solution with a completely different API.
Please refer to the Quick start section of the docs.
Check out the Samples section of the docs for a full description of each sample.
Check out the template repository which may be used to kick-start a project for you.
Checkout a voluntary list of projects/companies using Decompose: https://github.com/arkivanov/Decompose/discussions/366. Feel free to add your project!
Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation
A comprehensive thirty-line navigation for Jetpack/Multiplatform Compose - if you find Decompose verbose and would prefer something built on top of Compose.
"Component-based Approach" series by Artur Artikov
Twitter: @arkann1985