Is there any library / way to create something like Event Bus in Jetpack Compose
n
nilTheDev
10/04/2021, 2:20 PM
What do you mean by Event bus?
A flow? Maybe?
a
adjpd
10/04/2021, 2:26 PM
I tend to think the methods on your state object and the propagated state render an event bus redundant
z
Zach Klippenstein (he/him) [MOD]
10/04/2021, 8:56 PM
An event bus is really just a pattern you can implement a number of ways, with or without compose. If you want an event bus, you don't need anything special for compose. But in my experience they tend to make code harder to maintain, so I would avoid.
h
Hachemi Hamadi
10/04/2021, 9:09 PM
Is there any other way to notify the UI about let's say token expiration after a network response with 401 code. I want to be able to log out the user, and i though doing it with an interceptor (using okhttp) would be better than writing it with each request made.