`<https://github.com/greenrobot/EventBus>` =&gt; 2...
# android
s
<https://github.com/greenrobot/EventBus>
=> 2 years without update => Do you think it dead? Or anything can do the same things EventBus but written on pure Kotlin ???
g
why do you need eventbus at all?
s
to get rid out of Callback Hell …
a
@Sam you can try RX java2
g
eventbus is like callback hell + events hell
s
Im using EventBus instead Callback hell..
a
please try Rx Java you will love it
g
I mean this project is dead with good reason, because EventBus is quite nasty pattern imo
Or kotlinx.coroutines Flow after all, you just starting your project
s
eventbus is like callback hell + events hell
=> but how do you get rid out of call back hello such as onClick in view holder to send something to activity or fragment ????
kotlinx.coroutines
=> Im using rxkotlin, do you think coroutines better than rxkotlin?
g
rxkotlin is just a bunch extensions to make RxJava better to use from Kotlin
So it means that you already have RxJava
I love Flow, but I also use RxJava, so I wouldn’t say that I recommend to use one instead of another
s
@Akbar Herlambang: Im using Rxkotlin , but I want to find the way to simplify to avoid rewrite too much callback hell.
g
I mean events bus probably can simplify it in a same way how you can simplify code by using static global state or singletones
but price of this simplification is too high imo
s
@gildor: Do you have any idea to send some Object from view holder to fragment/activity ?
g
For such things as view holder I just usually do opposite, pass some lambda to view holder that will be called, and this lambda created on activity/fragment
👍 1
s
Please give me some example or link to do that things. p.s: u mean using
Unit ()
g
no I mean
() -> Unit
I mean just pass some callback to viewholder which then will be called
👍 3
K 1
❤️ 2
s
ohm ok, I got it, Thank @gildor