spread syntax 대신 structuredClone!

JavaScript 나 TypeScript를 사용할 때 흔히 spread syntax로 object를 복사하곤 합니다. 이 방법은 대게 문제가 없지만 nest object나 array를 포함하면 제대로 작동하지 않죠. 이때 structuredClone이 좋은 대안같네요!

Deep Cloning Objects in JavaScript, the Modern Way

Builder.io

Deep Cloning Objects in JavaScript, the Modern Way

더 많은 콘텐츠를 보고 싶다면?

지금 간편 가입하고 다음 내용을 확인해 보세요!

또는

이미 회원이신가요?

2023년 1월 19일 오전 12:41

 • 

저장 41조회 3,436

댓글 0