How to deep merge instead of shallow merge?
Both Object.assign and Object spread only do a shallow merge. An example of the problem: // No object nesting const x = { a: 1 } const y = { b: 1 } const z = { …x, …y } // { a: 1, b: 1 } The output is what you’d expect. However if … Read more