I reviewed the following SO question: What are the Hot and Cold observables?
To summarize:
values
in your codepen is lazy - nothing happens until something subscribes, at which point it runs through and wires it up. So in your example, although you are subscribing to the same variable, it is creating two different streams; one for each subscribe call.
You can think of values
as being a generator of streams for click
with that map
attached.
.share()
on the end of that map would create the behaviour we expect, because it is implicitly subscribing.