DEV Community

Discussion on: Deep Equality checking of Objects in Vanilla JavaScript 👨‍👦

Collapse
 
tjslater profile image
Thomas Slater

Any particular reason why JSON.stringify isn't mentioned here?

Collapse
 
sanderdebr profile image
sanderdebr • Edited

In most cases it is pretty useful to use JSON methods, but functions and also React componens won't survive the serialization process using the JSON methods. But still, using the spread method for simple objects and JSON methods for more complex would be fine! My goal was to learn something about recursive functions with this article.

Relevant interesting article: dev.to/bytebodger/cloning-objects-...