DEV Community

Discussion on: RxJS Best Practices

Collapse
 
kildareflare profile image
Rich Field

@nyagarcia In your first example about not putting logic in subscribe, the before and after code examples are the same.

Collapse
 
nyagarcia profile image
Nya

Thank you, just fixed it :)

Collapse
 
kildareflare profile image
Rich Field

No worries. Great post, I've definitely made some of those mistakes before :0).

I think I found another problem though.

In the first example of unsubscribing from observable. You are not unsubscribing from the pokemonLevel$ observable, but calling next on stop$. Which, I think should not even be in this example, as you show that as an alternative solution in the second example, right?

Thread Thread
 
nyagarcia profile image
Nya

Hey Rich,
I'm not really sure what's going on, all the gists are mixed up D: Which is odd, since this is basically a copy paste from the original post which is posted on medium, and the gists are fine on there... I'll change them again and see if they stay in the correct order, thanks for letting me know again!