Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

rxjs que recibe como parametro un observable

const $button = document.getElementById('main-button');const click$ = fromEvent($button, 'click');const subscription = click$.subscribe({  next: (e) => console.log('Event :', e)});// Luego de 5 segundos se cancela la suscripción a click$setTimeout(() => {  subscription.unsubscribe();}, 5000);
Source by medium.com #
 
PREVIOUS NEXT
Tagged: #rxjs #recibe #como #parametro #observable
ADD COMMENT
Topic
Name
8+4 =