Please see the project website for documentation and APIs.
Decompose is a Kotlin Multiplatform library for breaking down your code into lifecycle-aware business logic components (aka BLoC), with routing functionality and pluggable UI (Jetpack Compose, Android Views, SwiftUI, JS React, 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 fork.
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:
- All the stars were transferred
- All the Issues and Discussions were transferred as well. I will do all my best to fill the gap here.
- All pull requests with all the comment history are also gone.
I will continue doing all my best for this project and for the community! Business as usual!
Please check the Installation section of the documentation.
Here are some key concepts of the library, more details can be found in the documentation.
- Component - every component represents a piece of logic with its own lifecycle, the UI is optional an is plugged externally
- ComponentContext - every component has its own [ComponentContext], which makes components lifecycle-aware and allows state preservation, instances retaining (aka AndroidX
ViewModel
) and back button handling - Router - enables navigation between child components, nested navigation is also supported
- Lifecycle - provides a way to listen for lifecycle events in components
- StateKeeper - makes it possible to preserve state or data in a component when it gets destroyed
- InstanceKeeper - retains instances in your components (similar to AndroidX
ViewModel
) - BackPressedHandler - provides a way to handle and intercept back button presses
Check out the project website for a full description of each sample.
- Decompose — experiments with Kotlin Multiplatform lifecycle-aware components and navigation
- Fully cross-platform Kotlin applications (almost)
Twitter: @arkann1985