Reactive-101 Flashcards

1
Q

What is the main focus for Reactive?

A

main focus is working with

an asynchronous data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the more in Reactive compared to events?

A

It listen , acts, and create event streams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Write some usages of R..ive?

A
Graphical user interface 
•Animation 
•Robotics 
•Simulation 
•Computer vision
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What this depicts?

A

() = {} , it says the implementation of a funtion and has no arg , arg => {} , like this is with arg

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does map and take do

A

map listens to each event, for e.g. arr has 5 elements , so it will 5 events and map will to all five, take will limit the max events the map has listen to

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are Observables & Observers?

A

Observers listen to event streams & Observables relay the event streams

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are hot and cold Observables?

A

Hot Observables they emit irrespective of observer, like mouseevents , A cold observable, on the other hand, is an observable
that fires the same sequence for all the subscribers. An
example of a cold observable is an observable created
from an array.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Can we turn a cold into Observables

A

Yes in Rxjs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What the from will do?

A

It can create an observable from an iterable , array , set or map

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the form of from

A

Observable.from([0,1,2]).subscribe( a => {})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How to use mapFunction to propagate the double of each element

A

Rx.Observable
.from([0,1,2], (a) => a*2)
.subscribe((a)=>console.log(a));

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Does from takes map and set also?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does range do?

A

It applies the start and last range

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How will you Create an observable using period of time?

A

using interval(millis), and interval is a cold observer so you need to have subscribed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Is there any timer function in rxjs?

A

Rx.Observable.timer(dueTime, [interval], [scheduler]);

//scheduler is always optional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the backbone of any functional reactive program?

A

map()
•flatMap()
•filter()
•reduce()

and the like

17
Q

Does the operators are also observable themselves?

A

Yes, they written Observable again after transforming the data & thus it can form a chain