Language concepts
Structural sharing
Reuses unchanged branches between state versions. Avoid mutating shared branches; this is a design convention, not a deep-freeze guarantee.
Formal Syntax & Structure
javascript syntaxjavascript
next.unchanged === previous.unchangedWorking Example
Example Snippetjavascript
const a={x:1,meta:{id:3}};const b={...a,x:2};console.log(a.meta===b.meta);