Decompose
kotlinx.coroutines
Our great sponsors
Decompose | kotlinx.coroutines | |
---|---|---|
20 | 59 | |
1,902 | 12,680 | |
- | 0.9% | |
9.2 | 8.9 | |
9 days ago | 2 days ago | |
Kotlin | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Decompose
-
What do you use for compose navigation?
I use Decompose, although I also have a kmp project which that supports. I find the compose extensions providing a very easy API when integrating with compose.
-
Anyone here who uses compose-multiplatform for desktop apps, what’s your feedback?
For one of our apps we used https://arkivanov.github.io/Decompose/ for navigation. It is mentioned in the Compose Multiplatform repo, but we found it pretty obscure to use and it has some confusing concepts built in.
-
Single Activity Apps: Fragments vs Views in 2022
I don't have much experience with conductor, so I'm curious what your concerns about lifecycle is lacking compared to fragments? But if your team already knows that framework I might just stick with views over fragments. I see there is a compose integration if you do ever plan on picking that up with conductor. Otherwise compose makes fragments obsolete and your team already knows conductor. I do agree the navigation story in compose is not mature especially after jetpack compose navigation. But there are other 3rd party libraries like compose destinations or decompose, but would be nice to see something better 1st party.
-
Which navigation library for compose do you suggest?
I personally like decompose for its testability, clear separation of concerns, and apis for compose animations. Plus it's multiplatform so you can use it for other kmp targets.
-
Is MVI way to go for new applications with compose
Full discretion, all my new apps are built using mvi with MVIKotlin and decompose for the compose extensions for navigation animations. A sample project I have built with that architecture can be found here.
-
Decompose VS appyx - a user suggested alternative
2 projects | 30 Aug 2022
-
Appyx - Application mechanics for your Android apps, built on top of Jetpack Compose (Navigation)
Check out Decompose, it's multiplatform - https://github.com/arkivanov/Decompose
-
Received a job offer letter with "All inventions developed by you during your period of employment with the Company will be deemed as the property of the Company." Its a Web dev job. How would this affect my mobile app dev hobby. I occasionally publish apps/games to PlayStore.
Decompose
-
ViewModels & Compose: State/StateFlow/Lifecycle
I personally don’t like the idea of mixing compose state in the view model layer, as that implies it can only work with compose. But I also have been writing a kotlin multi platform app which exposes the state to SwiftUI using a custom data type with decompose
The custom wrapper is called Value which is just a platform agnostic state holder. Then there is an extension function you can use in compose to observe that state in compose.
kotlinx.coroutines
-
Reactive Backend Applications with Spring Boot, Kotlin and Coroutines (Part 2)
Kotlin has coroutines that are supported by the language and implemented by a library (the implementation remains platform-dependent): kotlinx.coroutines and a sandbox environment is available here to try it out.
- Kotlinx Coroutines for Kotlin 1.7.x
-
Why no one recommends the use of the standard library's Result class but a custom sealed class approach?
Sure! runCatching catches Throwable right? Well when you cancel a coroutine it throws a CancellationException and this gets used as a signal to stop execution. runCatching stops that signal so the coroutine keeps running. Lemme find you a link real quick https://github.com/Kotlin/kotlinx.coroutines/issues/1814
-
Is there thread switching when moving from Default dispatcher to IO dispatcher using withContext?
According to the author of kotlinx.coroutines lib, it will try to keep the same thread if possible but not always. After my question, he updated the document of Dispatchers.IO to be like this https://github.com/Kotlin/kotlinx.coroutines/pull/3236/files This dispatcher and its views share threads with the [Default][Dispatchers.Default] dispatcher, so using `withContext(Dispatchers.IO) { ... }` when already running on the [Default][Dispatchers.Default] dispatcher typically does not lead to an actual switching to another thread. In such scenarios, the underlying implementation attempts to keep the execution on the same thread on a best-effort basis.
I think it is a great question and you can ask it on github
This is the issue I posted in GitHub https://github.com/Kotlin/kotlinx.coroutines/issues/3234 Thank you for the suggestion
-
Am I on the right track?
DI: Dependency injection: Check out Dagger Hilt, Koin or Kodine. Architecture: Android tends to be MVVM but, MVP, MVI and some others exist. Async calls: For kotlin, coroutines. Rxjava can be used with kotlin or java. I'm not actually sure how java devs do asyn calls these days.
-
Build, Test and Deploy your Android Application📱 with GitHub Actions 🤖
Kotlin based, Coroutines + Flow for asynchronous.
-
Java Virtual Threads Preview
Interestingly, Kotlin Coroutines have been available and in production for a LONG time now.
https://github.com/Kotlin/kotlinx.coroutines
In fact, Kotlin Coroutines are an brilliant on the android platform. We are talking severely memory and CPU constrained architectures here.
That said, Kotlin Coroutines are popularly used in production on server side - https://vertx.io/docs/vertx-lang-kotlin-coroutines/kotlin/
So here's the thing - I would doubt anyone would switch to Java Virtual Threads anytime soon.
-
Need Help Testing Callback Style Code with Coroutines
Anyways, it seems like it's a common enough issue that it is getting the attention of the kotlin team. I have high hopes for this PR that looks like it might be close to merging, and has activity within the last couple of days.
What are some alternatives?
voyager - 🛸 A pragmatic navigation library for Jetpack Compose
PreCompose - Compose Multiplatform Navigation && State Management
kotlin-coroutines - Examples for coroutines design in Kotlin
kotlin - The Kotlin Programming Language.
Appyx - Model-driven navigation + UI components with gesture control for Compose Multiplatform
koin - Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform
compose-multiplatform - Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
okio - A modern I/O library for Android, Java, and Kotlin Multiplatform.
Kotlin-Multiplatform-Libraries - Kotlin Multiplatform Libraries. Welcome PR if you find or create new Kotlin Multiplatform Library.
korim - Korim: Kotlin cORoutines IMaging, Bitmap and Vector graphics for Multiplatform Kotlin
korio - Korio: Kotlin cORoutines I/O : Virtual File System + Async/Sync Streams + Async TCP Client/Server + WebSockets for Multiplatform Kotlin 1.3
spring-native - Spring Native is now superseded by Spring Boot 3 official native support