JavaScript

RxJS & observables

Në shqip: RxJS dhe observables

ShpjegimiSQ

RxJS punon me „observables“ — rrjedha vlerash që vijnë me kohë (klikime, kërkesa, mesazhe). Me operatorë si map, filter dhe debounceTime i përpunon si vargje. Angular e përdor kudo.

EnglishEN

RxJS works with “observables” — streams of values arriving over time (clicks, requests, messages). With operators like map, filter and debounceTime you process them like arrays. Angular uses it everywhere.

Si ta mendosh

Si një lumë ku filtron dhe përpunon ujin ndërsa rrjedh.

Lexoje në anglisht

Like a river where you filter and treat the water as it flows.

Shembull kodijavascript

fromEvent(kerkimi, "input").pipe(
  map((e) => e.target.value),
  debounceTime(300),
).subscribe(kerko);

Terma të lidhur