Slide 33
Slide 33 text
ASYNC OPERATIONS
RX BASED (REDUX OBSERVABLE)
const fetch = () =>
queryA().flatMap(a => (
queryB(a).flatMap(b => (
queryC(b).flatMap(c => (
[a, b, c]
))
))
))
.subscribe(([a, b, c]) => {
dispatch(a, b, c)
})
const fetch = () =>
queryA().then(a => (
queryB(a).then(b => (
queryC(b).then(c => (
[a, b ,c]
))
))
))
.then(([a, b, c]) => {
dispatch(a, b, c)
})
Really no big difference
Similarity between Rx and Promise
There must be something
How to combine those observables?