A source of truth is the authoritative home of a data value. Other representations delegate to it, giving users multiple ways to read or change the same state without allowing those representations to diverge. section 3.3
Web components commonly use this pattern for two practical reasons:
- Attributes let HTML specify component data, while properties let JavaScript access the same data more directly. section 3.3
- Frameworks such as React and Vue may synchronize same-named attributes and properties, so components should keep those interfaces consistent. section 3.3
HelloWorld with an attribute as the source
The `name` attribute owns the value. The `name` property getter reads it, the setter writes it, and observed attribute changes trigger rendering. Editing `<hello-world name="Alpha">` in DevTools therefore changes the display to “Hello, Alpha!”; changing it to “Beta” updates the result again. section 3.3
The same synchronization rule also supports server-rendered custom elements. A property-backed component can update an existing attribute and rendered shadow content, while Declarative Shadow DOM supplies initial markup before client-side behavior is connected. section 11.2












