I'm new to reactive programming, and I lost a little reading all of these articles, which I cannot understand.
Actually, I am a javascript developer from Nodejs, Angularjs, Angular 2 and React.
What am I doing
I use promises all the time, for remote data retrieval, local async resolution, etc ... Better testing ability than callbacks that fit my needs.
What I understand using streams
I can’t understand where the threads can save me, except in a specific case.
This particular case is that I cannot use promises while listening to streams, because the promise will be resolved only once.
SocketIo example:
io.on('connection', (socket) => { // this works }); io.on('connection').then((socket) => { // this can't work, promise would be resolved only once });
If I am not mistaken, I can use reactive flows to control this case, simply returning the observable. Right?
What? I do not understand
I am learning Angular 2 and all around. In fact, of the many blogs people use to use observational data to retrieve deleted data, and I cannot figure out what might be the advantage of using it instead of promises.
The fact is that I needed to do the remote, as in both cases, so why more than the other? Is this a performance issue?
What I need
If you read the whole question, I need to understand what are the advantages of using reactive programming instead of promises in case of remote data fetching?
In what (other cases) would it be better to use reactive material than ordinary material?