loading...

re: What's the best way to deeply clone an object in JavaScript? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: const deeplyCloned = object.assign({}, myObj)
 

The method Object.assign() is not a "full" deep clone, works only at the first level. Example here. Maybe recursive Object.assign() does the job.

 

cloning nested object is like diving into a black hole

Code of Conduct Report abuse