The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Creation operators: fromEventPattern, fromEvent

Creation operators: fromEventPattern, fromEvent

3:49
Besides converting arrays and promises to Observables, we can also convert other structures to Observables. This lesson teaches how we can convert any addEventHandler/removeEventHandler API to Observables.
Watch this lesson now
Avatar
egghead.io

Besides converting arrays and promises to Observables, we can also convert other structures to Observables. This lesson teaches how we can convert any addEventHandler/removeEventHandler API to Observables.

Avatar
David

When is it executed removeEventHandler function? I see in docs it is an optional argument, but don't know how it would be used. Can you provide a practical example using both arguments?

In reply to egghead.io
Avatar
Andre

Hi David. When we unsubscribe from the Observable created with fromEventPattern, the removeEventHandler function will be called.

In reply to David
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?