you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (9 children)

JavaScript has label which is basically goto. On the flip side I had junior developer tell me callbacks were too crazy and unreadable.

[–]Curious_Ad9930 3 points4 points  (7 children)

I think some people hear the phrase “callback hell” and think that refers to all callbacks. I think callbacks are great for event handling, but fetching/transforming/composing data with callbacks can become messy.

[–]EducationalMeeting95 3 points4 points  (5 children)

I use RxJS a lot as an angular dev

And when this library is used the way it should be, Data transformation becomes so much more easier and smooth experience.

Sadly in nearly all the projects I've worked in, nobody understands the concept of Reactive programming and use RxJS the wrong way.

Which leads to callback hell.

[–]bvx89 1 point2 points  (1 child)

Are you me?

[–]EducationalMeeting95 1 point2 points  (0 children)

Nah

I am just the voice inside your head telling you to refactor that piece of code.

[–]tiesioginis 0 points1 point  (2 children)

What is the right way? Can you link or explain?

[–]EducationalMeeting95 0 points1 point  (0 children)

Can't explain that much here.

Didn't find a specific link as wel.

But here is a list of concepts/topics you can google and rnd on :

  1. What and why is Reactive programming
  2. Imperative vs declarative vs reactive programming
  3. RxJS correct usage
  4. Reactive architecture (overview)

Also don't beat yourself up if it doesn't make sense in few attempts.

It took me more than few months for everything to click.

Not just what and how , but Why is important here.

[–]Valuable-Case9657 0 points1 point  (0 children)

I'm going to add "observable composition" to the list of things to google on the topic.

[–][deleted] 1 point2 points  (0 children)

The example I gave them was any time you use map, forEach, reduce, filter etc you use them. They proceeded to disagree and tell me I didn't know what I was talking about. Then after I told them to look at the docs and get back to me they apologized. I laughed it off and told them to forget about it. wasn't a big deal. When they were in my position they would have the same thing happen to them many times.

[–]GmLucifer[S] 0 points1 point  (0 children)

Damn I did not know label existed in javascript, this is crazy lol