Expert
I wana listen to an input field in order to offer auto-completion to my user.
const input = document.getElementById(id)
fromEvent(input, 'keydown').pipe(
***************,
map(e => e.target.value)
)
By which operator can I replace ******* to avoid making an API call each time the user presses a key?
Author: Amine BouchamStatus: PublishedQuestion passed 150 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
1
Combine a large number of requests in RxJS0
How is this way of doing called?
```ts
interface UserData {
[key: string]: any;
}
class UserDataService {
private userData: BehaviorSubject<UserData> = new BehaviorSubject({});
private userData$: Observable<UserData> = this.userData.asObservable();
public setUserData(userData: UserData) {
this.userData.next(userData);
}
public getUserData(): Observable<UserData> {
return this.userData$;
}
public getUserDataByKey(key: string) {
return this.userData$.pipe(map((userData) => userData[key]));
}
}
```0
Why use name variables with **$** at the end in RxJS?0
Why use RxJS ?0
Explain the difference between a Subject and a BehaviorSubject in RxJS0
Explain the difference between a ReplaySubject and a BehaviorSubject in RxJS0
Chain 2 observables in RxJS