ReactiveX / learnrx

A series of interactive exercises for learning Microsoft's Reactive Extensions Library for Javascript.
1.4k stars 292 forks source link

Revise lesson 36 and onward for the RxJS 5 API #157

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello there,

First of all, thank you for producing these practical lessons. They have been a very useful introduction to the thought process for reactive programming.

After I reached lesson 36, I noticed that running the lesson code didn't result in JSON data being returned successfully. Instead, I was seeing:

image

I dug into this a bit and eventually came to the conclusion that the lesson code was assuming an RxJS 4.x API. In RxJS 5, forEach no longer takes three functions corresponding to the next, error and complete states. This might explain why I was seeing the alert above (i.e. the promise constructor).

My guess at fixing this problem would be to switch over to subscribe and update the code to use the new Observable interface.

Furthermore, the throttle function has been renamed to throttleTime, which renders some of the later lessons unusable too.

I'm happy to do a pull request to fix these things, but I wanted to check the intent of the existing lessons beforehand.

jesusreal commented 7 years ago

I just finished the tutorial. +1 regarding the throttle method. Also for the "scan" operator the order of the arguments has to be updated. I would also be happy to create a pull request for these 2 issues.

morenoh149 commented 7 years ago

@jesusreal it'd be welcome

jesusreal commented 7 years ago

Thanks @miqid for taking the time to do a pr for the issues. As the pull request got merged almost two months ago, I think this ticket should be closed :)

thw0rted commented 6 years ago

I'm still having these issues on http://reactivex.io/learnrx/ -- is this tracker the right place to discuss that version of the site? Is there a better place to try the latest-and-greatest version?

morenoh149 commented 6 years ago

@thw0rted this is the issue tracker for that site. Feel free to open new issues for new issues or add new info on existing issues.