If you have a collection of data that gets mapped different ways based on characteristics of the data, it can get complicated to build a function that knows how to do that, unless you incorporate a hash or some sort of matcher scheme in your function.

The hard part about both Classes and FP is figuring out how to express the concept in the simplest, most legible way possible. And if you can't do it in Classes, most likely switching to trying FP won't make you any better at that. I think the problem with the JS community is they're looking for a magic bullet to cover basic skills gaps that the industry itself installs in most programmers when they're juniors.

Amy Blankenship
Amy Blankenship

Written by Amy Blankenship

Full Stack developer at fintech company. I mainly write about React, Javascript, Typescript, and testing.

No responses yet