What is the alternative to takeFirst method

Viewed 133

I am new to RxAndroid, that's why referring to all the operators of Rx. I have found out that observable.takeFirst() is showing redline as it could not be found in RxJava3. Can anyone tell me what is the alternative to takefirst() method?

1 Answers

takeFirst was removed in RxJava 2. Use filter(predicate).take(1).

Related