L
Size: a a a
L
L
this.updateBook$.next() -> в сабскрайбе тоесть ты знаешь что айди меняеться, ты можешь передать в сабжект айдишку или что-то другое
this.updateBook$.asObservable().subscribe(() => // logic to download)
VS
this.updateBook$.next() -> в сабскрайбе тоесть ты знаешь что айди меняеться, ты можешь передать в сабжект айдишку или что-то другое
this.updateBook$.asObservable().subscribe(() => // logic to download)
L
NS
L
S
L
L
L
L
L
L
S
cconst bookId = ...
const book = bookId.pipe(
switchMap(id =>
concat(of(null), update).pipe(
switchMap(() => getBook(id))
),
),
)
C
L
cconst bookId = ...
const book = bookId.pipe(
switchMap(id =>
concat(of(null), update).pipe(
switchMap(() => getBook(id))
),
),
)