First time with Rx.js
Basically I will have two buttons, add and stop. Setup 2 sources to receive event from these two buttons so you can see two variables.
Then I use some operators to handle click event from add button and generate new state and pass to render function. Now I have done the behavior of add button.
After rendering new state, the new item shows up in the fileList container. Now I have to add remove event upon it. I use takeUntil to unsubscribe this observable and then use subscribe to activate it.
The overall snippet is as below.