event-emitter
androidx
Our great sponsors
event-emitter | androidx | |
---|---|---|
9 | 14 | |
77 | 5,061 | |
- | 2.2% | |
0.0 | 10.0 | |
about 1 year ago | 5 days ago | |
Java | 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.
event-emitter
-
ViewModel: for UI business, not UI operations 😮
If you mean UI events like the events from the Model to the UI, then you can use a sealed class and a Channel or EventEmitter
-
Kotlin Flow implementation of SingleLiveEvent
I can also comment https://github.com/Zhuinden/event-emitter 😛
-
Sending View Model Events to the UI (is this how people are handling Navigation and Snackbars now?)
For events, I use https://github.com/Zhuinden/event-emitter with https://github.com/Zhuinden/live-event
-
What's the proper way of accessing a Composable function from a non-composable one?
I use https://github.com/Zhuinden/event-emitter for this sort of thing via DisposableEffect(Unit) {
-
MVVM and one shot operations
If there isn't multiple screen switches involved, I use https://github.com/Zhuinden/event-emitter
-
LiveData is superior to StateFlow for UI and ViewModel layer.
That's why I wrote EventEmitter and never had a problem.
-
What is your currently configured SharedFlow implementation ?
I use BehaviorRelay in place of MutableStateFlow/MutableLiveData, and I use EventEmitter in place of uh, SingleLiveEvent I guess.
-
LiveData vs SharedFlow and StateFlow in MVVM and MVI Architecture
Well I've been using this which is merely a lifecycle-aware wrapper over this, if you're in Kotlin and you are using coroutine stuff then you can also use Channel(UNLIMITED) with receiveAsFlow()
androidx
-
Building Reddit Recap with Jetpack Compose on Android
To diagnose whether our composables and models meet these criteria, we leveraged Compose Compiler Metrics. These gave us stability information about the composable parameters and allowed us to update our UiModels and composables to make sure that they could be skipped. We ran into a few snags. At first, we were not using immutable collections, which meant that our list parameters were mutable and hence composables using these params could not be skipped. This was an easy fix. Another unexpected issue we ran into was that while our composables were skippable, we found that when lambdas were recreated, they weren't considered equal to previous instances, so we wrapped the event handler in a remember call, like this:
-
Is there anywhere on github which has the latest Android Open Source Project (AOSP) files?
I am trying to manually copy and paste out the pieces of code I need from the glance source code and put into my Android Studio project but as you can imagine there are hundreds of errors to address. I also tried a git clone of a specific chunk of the source code from here without any luck.
-
Simple RSS Feed Reader - Jetpack Compose
One mistake I made is naming conversion of a composable function, that I didn't start with a noun. This is quoted from Compose API guidelines
- Does anyone actually use DataStore?
-
Where is the GitHub repo for kotlin multi platform mobile. I can't find it?
https://github.com/androidx/androidx The androidx repo might be what you're looking for
-
Introducing Focus, a new open source Gradle plugin
Haven't looked too closely yet, but so far this seems similar to AndroidX Playground (albeit Playground isn't exactly meant for public consumption, of course).
- Just because Jetpack Compose is out, it does not mean we have to bury the old XML
-
LiveData is superior to StateFlow for UI and ViewModel layer.
This is the implementation of CoroutineLiveData: https://github.com/androidx/androidx/blob/androidx-main/lifecycle/lifecycle-livedata-ktx/src/main/java/androidx/lifecycle/CoroutineLiveData.kt
-
What is current best tech stack for modern apps?
SafeArgs VM isn't safe?
-
Do you use SharedPreferences?
preferences datastore is similar to SharedPreferences. Proto datastore is the one you should be using, and is based on protocol buffers to give you type safety among other advantages. Even in the case of preferences datastore though, it doesn't appear to even mention SharedPreferences. You can see the source for all datastore components here: https://github.com/androidx/androidx/tree/androidx-main/datastore
What are some alternatives?
Kotlin_Flow_To_The_View - PoC using Flow completely on an Android Projet with MVVM architecture. No LiveData. The advantage over simply using the viewModelScope is the fact that 5 seconds after leaving the application (not killing it !), the coroutine is cancelled, avoid possibly unnecessary work.
navigator - A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).
jetpack-autoloader - [READ ONLY] Autoloader for Jetpack. This repository is a mirror, for issue tracking and development head to: https://github.com/automattic/jetpack
live-event - [ACTIVE] Lifecycle-aware wrapper over EventEmitter, for modelling one-off events.
Dispatch - Automatic CoroutineDispatcher injection and extensions for kotlinx.coroutines
compose-destinations - Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
PiCompose
voyager - 🛸 A pragmatic navigation library for Jetpack Compose
Anko
android-dev-challenge-compose-design