Javascript - How to copy objects

preview_player
Показать описание
Javascript tutorial. This shows how to copy object in js.
Shallow copy and deep copy

0:00 Use case
7:05 trying to learn piano

Рекомендации по теме
Комментарии
Автор

structuredClone has become core in my NgRx code, which requires object immutability. Spread syntax (which is used in the NgRx docs), was fine for simple state properties, but any entities that had nested objects or arrays, spread syntax was insufficient to update the state in a unidirectional data flow manner.

michaelbagnasco