Re:Deep Cloning Objects in JavaScript, the Modern Way
by compacct27 on Thursday December 21, 2023 @07:20PM
(#38729135)
React needs a new object for its hooks when you change them. We need to modify those objects, so deepClone + direct mutation on the clone bypasses a lot of annoying immutable object creation bs. ppl just destructure the whole thing anyways, which is actually also pretty slow
[ Parent
| on HN ]