The author proposes adding a native declarative templating API to the web platform to simplify dynamic DOM creation and updates.
Current web frameworks use templating to improve code ergonomics, security against XSS, performance, and static analysis.
A built-in API could reduce dependency on external libraries, shrinking bundle sizes and improving load times.
Tagged template literals offer a way to define templates today without new JavaScript syntax, with future JSX support possible via compile targets.
Combining template identity updates with fine-grained signals reactivity can deliver efficient and flexible DOM updates.
Get notified when new stories are published for "🇺🇸 Hacker News English"