What is the difference between mergeMap and mergeMapTo?
问题 In rxjs5 doc, it mentions 'To reduce polymorphism and get better performance out of operators, some operators have been split into more than one operator'. What does it actually mean and how to use the mergeMapTo operator? 回答1: From the docs, mergeMapTo: It's like mergeMap , but maps each value always to the same inner Observable. I see mergeMapTo as a shortcut to always output the same value. mergeMapTo doesn't care about the source value. Also from the docs: Maps each source value to the