share
signature: share(): Observable
share(): Observable
Share source among multiple subscribers.
💡 share is like multicast with a Subject and refCount!
Examples
Example 1: Multiple subscribers sharing source
( StackBlitz | jsBin | jsFiddle )
Related Recipes
Additional Resources
share 📰 - Official docs
Sharing streams with share 🎥 💵 - John Linquist
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/share.ts
Last updated