On my journey of learning React, I was moving along nicely. It made sense to me. But after a while I kept running into a problem while I was following along, watching others write code in videos: Redux.
I tried. Really, I did. I did tutorials on YouTube. I did courses on Udemy. I tried to make sense out of what others were posting in forums and blogs... But I just didn't get Redux. I had a decent concept of what it did but I couldn't figure out how it did it.
I was actually reading everything. Word. For. Word.
And then, lo and behold, the lights came on. I could see it. I had everything laid out before me in a single file and I could actually follow the logic of what all the pieces did and how they interacted. (I still don't know why I didn't think of that before...)
Let me stop for a minute and say, for the record, that I love the videos I watched and the courses I took. The majority of the instructors are super knowledgeable in these topics. But the problem I had was they were splitting the Redux code up into different files (which is proper to do) in a way that made it nigh impossible to put it together in my mind.
Why were they like that? The instructors were teaching React-Redux. They taught me how to use
connect() to "wire-up" my React component to a Redux store. Which was awesome. But still left me confused.
I honestly don't think I ever even took into consideration that Redux was a thing on its own.
So, I created this Simple Redux Example on CodePen for anyone wanting to tinker with Redux as a stand-alone library.
Follow-up post available here.