Posts

Showing posts with the label reactive-programming

Observable fires only once

Observable fires only once I decided to pick up this RxJS tutorial over the weekend to learn about reactive programming. The goal is to set up a simple page that generates an interactive list of users from the Github users API using Observables. The list displayed is a subset of the total number of users retrieved (in my case 3 out of 30). The list needs to be refreshable (show a new set of users), and you need to be able to remove entries from it by clicking the 'remove' button on each respective entry. I've set up a chain of Observables to define the behavior of the page. Some act as events to trigger processing, and some publish processed results for use in the app. This chain should dynamically cause my list to be updated. Currently, the default flow is like this: A list update is triggered on startup, by refreshing the list and by removing something from the list. However, when I refresh the list, this happens: As you can see, the trigger to update the list of users is...