find
signature: find(predicate: function)
find(predicate: function)
Emit the first item that passes predicate then complete.
💡 If you always want the first item emitted, regardless of condition, try first()
!
Examples
Example 1: Find click inside box, repeat when a click occurs outside of box
( StackBlitz)
Additional Resources
find 📰 - Official docs
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/find.ts
Last updated