+
Skip to content
forked from badoo/Decompose

Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.), inspired by Badoos RIBs fork of the Uber RIBs framework

License

Notifications You must be signed in to change notification settings

Morfly/Decompose

 
 

Repository files navigation

Maven Central License Twitter URL

badge badge badge badge badge badge badge

Decompose

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.). This project is inspired by Badoos RIBs fork of the Uber RIBs framework.

Setup

Setup Decompose in your Gradle project

Overview

  • Components - every component represents a piece of logic with lifecycle and optional pluggable UI.
  • ComponentContext - provided to every component with the tools for routing, state keeping, instance keeping and lifecycle
  • Routers - responsible for managing components with a backstack and its own Lifecycle
  • StateKeeper - preserve state during configuration changes and/or process death
  • InstanceKeeper - retain instances in your components (similar to AndroidX ViewModel)

Component hierarchy

Pluggable UI hierarchy

Typical component structure

Samples

Check out the project website for a full description of each sample.

Articles

Author

Twitter: @arkann1985

If you like this project you can always Buy Me A Coffee ;-)

About

Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing functionality and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.), inspired by Badoos RIBs fork of the Uber RIBs framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 99.4%
  • Groovy 0.6%
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载