Hi guys, would you say it’s necessary or unnecessa...
# coroutines
n
Hi guys, would you say it’s necessary or unnecessary to change the dispatcher upon flatMapLatest’s transform?
Copy code
fun getBooksFlow: Flow<List<Book>> = 
     getUserFlow().flatMapLatest { user -> getUserBooksFlow(user.userId) }.flowOn(Dispatchers.Default)
g
If function is not blocking and you don't do any heavy computations it's unnecessary to switch dispatcher
👍 1