re: I feel a little overwhelmed by middleware, redux-thunk, redux-saga VIEW POST


Very much so! I would say dealing with all the middleware is my least favorite part of my job. I think a lot of folks (myself included, at times) are willing to take it as "black magic." Meaning they'll follow whatever tutorials they can find that happen to be close enough to what they're working on, get it functional, and call it a day – all without actually knowing what's happening or why it works.

You didn't ask for advice, so disregard the below if you're not looking for any (I'm just a perpetual advice-giver, haha):
I've found it helpful to really try and question what's happening. Asking myself (or someone else) "okay, what is this really doing?" Sometimes this is reading the docs, sometimes it's looking at the source code, and sometimes it's just asking a more senior dev on my team to break it down for me. If I can figure out even a semblance of what's happening "behind the curtain", it makes it a lot easier to actually understand and remember vs just memorizing and regurgitating boilerplate because you know it works (until it doesn't...)

All that to say – you're definitely not alone on this one.



yeah, sometimes I ask questions and people also don't seem to understand it fully... some say you have to use a key={id} or else if you use key={index} the data on screen may show incorrect data but when everything is correct people don't know why and how to show an example of it not working. (and I later found out the data on screen won't be incorrect; it is just inefficient).

Is this so-called "declarative way" of programming instead of imperative? If you tell me use setA intersect setB and it is "declarative" and don't write a loop to do it imperatively, that I understand completely. React / Redux's way of "declarative" somehow isn't that fully understood. A lot of times, it is do this, do that, and you will have it. It is similar to Ruby on Rails and "pragmatic" way of programming: just do this and do that and it should work and people don't know why or how it works that deeply.

code of conduct - report abuse