2021/01(2)
-
BehaviorSubject vs ReplaySubject
BehaviorSubject와 ReplaySubject의 차이점을 예제를 통해 알아보려고 한다. Official Documentation - BehaviorSubject A variant of Subject that requires an initial value and emits its current value whenever it is subscribed to. initial 값을 지정해야 하고, 구독이 됐을 때 현재의 값을 emit 하는 Subject. - ReplaySubject A variant of Subject that “replays” or emits old values to new subscribers. It buffers a set number of values and will emit ..
2021.01.16 -
RxJS 'startWith'를 좀 더 똑똑하게 사용하는 팁
levelup.gitconnected.com/rxjs-operator-tips-startwith-d67109c8883e RxJS Operator Tips — startWith Creating awesome by combining startWith and EventEmitter levelup.gitconnected.com 해당 글은 Wandering Developer님의 'RxJS Operator Tips - startWith'를 번역한 글입니다. startWith와 EventEmitter를 조합하여 멋진 것을 만들어보자. RxJS documentation에 따르면, startWith : source observable에서 값들을 emit 하기 전에 당신이 정해둔 특정 값들을 먼저 emit 한다. The ..
2021.01.05