Lately, I’ve been learning Redux and I keep seeing things about functional programming. I had heard those words, and I vaguely understood the principles, but I was having some trouble really applying them in my code.
Some of my other developer buddies had told me about how functional programming makes your code cleaner, more efficient, more abstract and reduces the potential for the introduction of errors. I’m still struggling to incorporate these ideas by habit and so I’ve written this simple post to demonstrate the fundamentals of functional programming.
Let’s say that we have an array of user objects, something that would look like this: