4 ms·
Functional JavaScript has saved me so much. And I'm not talkin Ramda, just functional principles. I can't tell you how much time I spent chasing a bug when it
by mikercampbell 4y ago
Functional JavaScript has saved me so much. And I'm not talkin Ramda, just functional principles.
I can't tell you how much time I spent chasing a bug when it was a date that was passed by reference.
Rather than trying to keep track, I just return copies of arrays and objects and it's way easier.
Even a simple
```
function yeppers(input) => ({...input, x: 7})
```
(An overly simple example)
has made things smoother.