Home

Awesome

<picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/arkivanov/Decompose/master/docs/media/logo/titled-1.png"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/arkivanov/Decompose/master/docs/media/logo/logo-titled-dark.png"> <img src="https://raw.githubusercontent.com/arkivanov/Decompose/master/docs/media/logo/titled-1.png" width="300"> </picture> <br/> <br/>

License Twitter URL


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!

⚡⚡⚡ Where are all the stars, issues, discussions, pull requests, etc?

Having spent 5 years working on a variety of projects for Badoo/Bumble, I’m now off to another adventure. As part of that transition I was asked to transfer this repository to Badoo GitHub account.

Now I continue my work on this project as a copy.

There should be no breaking changes related to this transfer. Most of the external links should not be broken. The repository link is also the same: arkivanov/Decompose. Please file an issue in this repository, if you think something is broken or does not work properly.

Here is what is mostly affected by the transfer:

I will continue doing all my best for this project and for the community! Business as usual!

Additional resources:

Why Decompose?

Meme time!

<img src="docs/media/DecomposeMeme.png" width="512">

Setup

Please check the Installation section of the documentation.

Supported platforms

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.

Overview

Here are some key concepts of the library, more details can be found in the documentation.

Component hierarchy

<img src="docs/media/ComponentHierarchy.png" width="512">

Pluggable UI hierarchy

<img src="docs/media/PluggableUiHierarchy.png" width="512">

Typical component structure

<img src="docs/media/ComponentStructure.png" width="512">

Quick start

Please refer to the Quick start section of the docs.

Samples

Check out the Samples section of the docs for a full description of each sample.

Template

Check out the template repository which may be used to kick-start a project for you.

Articles

Author

Twitter: @arkann1985

If you like this project you can always <a href="https://www.buymeacoffee.com/arkivanov" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-blue.png" alt="Buy Me A Coffee" height=32></a> ;-)