Android_App/RxJava

[RxJava] Managing State with RxJava

brightlightkim 2022. 11. 11. 04:30

What if there are more async calls, there are a number of cases we should care about. 

When there are a number of cases.. in the Mobile Development

Everything in Android is async.

The activity life cycle is reactive. RxJava solves this problem.

RxJava can remove the intermediator code. It can connect directly to its components

 

Observable: Any time the user update the value with the user, we can do something with it 

Completable: It can receive failure or not. 

disposables >> lifecycle to disconnect from the componenets

Use the disposable list > disconnect it.

Whenever data is pushed in, you never have to pull it out.

 

State Problem

clicks: turning them into string everytime they clicks it

Then after that disable click one. 

flatMap: take items emissions and move them into observable that folded get back into the stream

if it's succeed

If it's an error and check it. 

However, it takes a lot of trouble.

 

 

 

'Android_App > RxJava' 카테고리의 다른 글

[RxJava] When and How to Use RxJava Disposable  (0) 2022.11.10