I love RxJs! It allows you to do powerful stuff in just a couple lines of code, which can feel like solving a very complicated puzzle.
What is the RxJs bit you implemented that you are most proud of?
So ideally I'd like this post to develop into a little collection like this one but only for the shorter bits of fun, because let's face it: How often does your boss want you to make a flappy birds clone? Mine never asked (thanks for nothing, boss!). This is probably a bit to much to hope, but I'm an optimist (sometimes)!
Note: I tried this before, but to no avail. Probably used the wrong tags. Please don't hate me for trying again!
Top comments (6)
I start of with a (probably not impressive and in a 1000 ways improvable) simple timer used to hide an popup after a short while. The timer gets reset, if the popup is triggered again.
How about?
I don't know if this could be optimized further ๐
It's a shame that this article didn't get more attention. I catch myself coming back to this particular comment time and time again :D
I've to admit that's prettier than mine! :)
This is a timer that only runs if there are entries in an Subject (holding an array), I used it to load/display items after a period of time (instead of having the website render ALL items at once)
So how to use this?
Once you have your list of items, you put all IDs into
currentWaitingSubject
and then subscribe on in and check until that ID you want to show/render isn't anymore in the list (in the Subject)Got another one: