Building a Stock Ticker

In the previous section, we built a typeahead. That covered only one kind of asynchronous flow—the frontend always triggers the initiating event and then waits for a response. The backend never provides new data unless the frontend specifically asks for it.

In this section, you’re going to build a stock market viewer, which will display the (randomly-generated) prices of several fake stocks in real time. The server will send data to the frontend at any time, and the code needs to be ready to react to new events. In additon, the Rx stream needs to track the current state of each stock ticker for display on the page. As a cherry on top to let you really flex your Rx muscles, we’ll add some on-page filters that require their ...

Get Build Reactive Websites with RxJS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.