Using Object.assign

Update:
This method has a flaw that it only does a shallow copy. It
means that nested properties are still going to be copied by
reference.

Be careful about it.

这也是我亲自踩坑之后才搜索到的。

标签: Object.assign, deep clone

添加新评论