Susan Harkins (387) [Avatar] Offline
#1
Please post errors found in the published version of RxJS in Action here. If necessary, we'll publish a comprehensive list for everyone's convenience. Thank you!

Susan Harkins
Errata Editor
468331 (1) [Avatar] Offline
#2
pg 33:
will be extremely brittle and hard to maintain and will cause to you to come in to work

pg 35:
As you’ll see learn later on, RxJS streams follow this same functor-like design.
afbroman (6) [Avatar] Offline
#3
pg 104:

Line 6 of the second code block should have a "let":

Instead of
for(result of testData)
it should be
for(let result of testData)
508741 (2) [Avatar] Offline
#4
Page 158 PDF - Missing "be"

Now, let’s tie the SessionDisposable object to a stream. For
this example, you’ll (be) use the using() operator to construct an observable sequence
that depends on an object whose lifetime is tied to the resulting observable sequence’s
lifetime; in other words, you’ll make one stream dependent on another one.
508741 (2) [Avatar] Offline
#5
''
457562 (3) [Avatar] Offline
#6
Page 131, paragraph 1, sentence 1: The first stream is delayed.

Intuitively, because the second first stream is delayed by 3 seconds, you’d expect to see the
letters a, b, and c emitted first.
457562 (3) [Avatar] Offline
#7
Page 145, paragraph 1, sentence 2: Should be every rather than everything.

Now, you’ll update the DOM strictly on a price change, which is much more optimal
than doing it naïvely everything 2 seconds.
457562 (3) [Avatar] Offline
#8
Page 169, second sentence after Listing 6.8: should be => operator

The subscriber receives the array and reduces it with a simple const add = (x,
y) -> => x + y;...
Rob A. (7) [Avatar] Offline
#9
Two errors on page 25.

First:
.then(promises => Promise.all(promise)) --> .then(promises => Promise.all(promiseS))


and in the next line there is a logic problem:
Second:
.then(promises => Promise.all(promise))
.then(
    dataInfo => ajax(`<host3>/data/files/${dataInfo.files}`)
)


here Promise.all returns a promise with an array that contains all resolved values. So in the following .then there is no .files property on the dataInfo object because that is an array. That means that there a .map() is missing which runs the ajax call on each item.
Rob A. (7) [Avatar] Offline
#10
Missing information about "swallowed errors" in promise context.
On page 188 the author says that promises can be swallowed if no error handler is provided. This is true for most browsers but at least newer versions of NodeJS throw an unhandled promise exception if an error is not handled.
Rob A. (7) [Avatar] Offline
#11
Page 116:
In the code where combineLatest is used there is a comma missing after the filter method (before the submit$).
Rx.Observable.combineLatest(
  password$
    .bufferTime(7000)
    .filter(R.compose(R.not, R.isEmpty))
  submit$
)


should be

Rx.Observable.combineLatest(
  password$
    .bufferTime(7000)
    .filter(R.compose(R.not, R.isEmpty)),
  submit$
)
Rob A. (7) [Avatar] Offline
#12
Page 223:
const p = new Promise((resolve, reject) => {
  setTimeout(() =>{
    let isAtAfter10pm = moment().hour() >= 20;
    if(isAtAfter10pm) {
      reject(new Error('Too late!'));
    }
    else {
      resolve('Success!');
    }
  }, 5000);
});


In the text it says "after 10 p.m." but moment().hour() >= 20 is after 8 p.m.
Rob A. (7) [Avatar] Offline
#13
Page 234:

Two consts that have the same name. The second const should have a different name like sub2.
const ticks$ = symbol$.mergeMap(fetchDataInterval$).share();

const sub1 = ticks$.subscribe(
  quoteDetails => updatePanel1(quoteDetails.symbol, quoteDetails.price)
);

const sub1 = ticks$.subscribe(
  quoteDetails => updatePanel2(quoteDetails.symbol, quoteDetails.price)
);
539022 (2) [Avatar] Offline
#14
page 167

example_url side effect, there is no use in input, since:

1. example_url is hardcoded
2. target.value is not propagated via pipeline in current implementation

https://github.com/RxJSInAction/rxjs-in-action/blob/master/examples/6/5/6_5.js

Thx
-Yura
Susan Harkins (387) [Avatar] Offline
#15
An errata list for Errata in RxJS in Action is available at https://manning-content.s3.amazonaws.com/download/1/efb5a96-45ae-481a-8e32-52a01142cac2/Atencio_RxJSinAction_Err1.html. Thanks!

Susan Harkins
Errata Editor
Gi11i4m (1) [Avatar] Offline
#16
116.jpg
[ 510 KB ]
p.116

The code says .take(10) but the comment says "Accepts only three password tries".

Either we don't understand the code or this is a wrong number.
|\|370 (2) [Avatar] Offline
#17
Gi11i4m wrote:p.116

The code says .take(10) but the comment says "Accepts only three password tries".

Either we don't understand the code or this is a wrong number.


Yes, I have the same feeling that it should say .take(3) instead of .take(10) in order to make sense.
|\|370 (2) [Avatar] Offline
#18
539022 wrote:page 167

example_url side effect, there is no use in input, since:

1. example_url is hardcoded
2. target.value is not propagated via pipeline in current implementation

https://github.com/RxJSInAction/rxjs-in-action/blob/master/examples/6/5/6_5.js

Thx
-Yura


Indeed!