Kotlin Reactive Programming Patterns | Etienne Caron

  Рет қаралды 4,008

AsyncAndroid

AsyncAndroid

Күн бұрын

Пікірлер: 12
@goobar
@goobar 4 жыл бұрын
Nicely done Etienne 👍👍
@RazvanBunea
@RazvanBunea 4 жыл бұрын
Well explained thanks ! Can you propose an implementation of FlowModelStore that no longer use `reduce()` as is depreciated (kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-core/kotlinx.coroutines.channels/reduce.html ) ?
@kanawish
@kanawish 4 жыл бұрын
​@@RazvanBunea Thanks for the question! You're looking at `Intent.reduce(oldState:T)` and not ` ReceiveChannel.reduce(op)`. Naming clashes do confuse things, something I might review in future samples. It's worth mentioning that Kotlin's Flow is actively being worked on, and as more of the new Flow features are making it into production, it will be possible to improve on the FlowModelStore implementation. I recommend keeping an eye on the following if you're interested in the nitty-gritty: github.com/Kotlin/kotlinx.coroutines/pull/1354 github.com/Kotlin/kotlinx.coroutines/issues/1973 github.com/Kotlin/kotlinx.coroutines/pull/1974 github.com/Kotlin/kotlinx.coroutines/issues/2034 [Btw, sorry for the slow answer, looks like I hadn't yet turned on "notifications" on this video back when you asked.]
@kanawish
@kanawish 4 жыл бұрын
Thanks folks! Happy to answer any questions :)
@tobiaspreuss
@tobiaspreuss 4 жыл бұрын
Did you see Razvan Bunea's question down here?
@kanawish
@kanawish 4 жыл бұрын
@@tobiaspreuss I in fact did not! Thanks for the ping :) I'll be answering it shortly.
@filippalexandrov1554
@filippalexandrov1554 Жыл бұрын
Amazing vid, gr8 thanks
@HoggsvilleAdventures
@HoggsvilleAdventures 4 жыл бұрын
Great video, thanks for sharing.
@AmrYousef
@AmrYousef 4 жыл бұрын
Great video, Thanks!. Curious why are you using Channel to pass intents to the store in FlowModelStore. Why not just use reduce then offer the new value directly every time process() is called.
@kanawish
@kanawish 4 жыл бұрын
Hello Amr, thanks for the question :) The idea here is to make all calls to `reduce()` happen from a singular coroutine scope. You can think of it as a single-threaded message queue if you will.
@ManishPatel3030
@ManishPatel3030 4 жыл бұрын
Cool video thanks 👌
@Shakenbeer
@Shakenbeer 4 жыл бұрын
Not really intuitive approach. Need time to get my head around. But in any case I need it to rid of RxJava and/or stop using LiveData in domain layer.
The Benefits of StateFlow and SharedFlow over LiveData  - Andrey Liashuk
29:08
Reactive Spring Boot With Kotlin Coroutines: Adding Virtual Threads
1:23:41
Kotlin by JetBrains
Рет қаралды 13 М.
Their Boat Engine Fell Off
0:13
Newsflare
Рет қаралды 15 МЛН
Andro, ELMAN, TONI, MONA - Зари (Official Music Video)
2:50
RAAVA MUSIC
Рет қаралды 2 МЛН
Kotlin Coroutines 101 - Android Conference Talks
24:49
Android Developers
Рет қаралды 138 М.
Deep Dive into Room Flows | Eric Maxwell
26:12
AsyncAndroid
Рет қаралды 1,2 М.
Kotlin Flows and Channels for Android • Ryan Pierce • GOTO 2020
18:43
Kotlin Flows in a Nutshell
13:59
Philipp Lackner
Рет қаралды 59 М.
Mastering Room Migrations | Adam McNeilly
22:08
AsyncAndroid
Рет қаралды 4 М.
Sequence Explained - Kotlin Collections
13:43
Cody Engel
Рет қаралды 4 М.
Clean Flow Transformations with Combine, Zip & Merge - Kotlin Flows
16:56