DEV Community

Discussion on: Functional vs Imperative Patterns in JavaScript

Collapse
 
joelnet profile image
JavaScript Joel

If you allow mutations, you have to deep clone. If you disallow mutations, shallow cloning is enough.

This is how libraries like list or immutable.js are so fast. They disallow mutations.

One of the advantages of FP.