When:
to
Room:
Hiten A
Track:
development and coding / 開発とコーディング

Declarative Shadow DOM and the future of Drupal Theming

Declarative Shadow DOM and the future of Drupal Theming

Drupal's old school theming system is server-side rendering. And in the tech world, everything old is new again. In the last two years, modern frontend frameworks have been trying to figure out how to server-side render their client-side JavaScript.

React v19 has figured out how to split its components into client and server parts. As of August 2024, this same "split component" capability is now a part of native Web Components with the introduction of Declarative Shadow DOM. Instead of being written in client-side JavaScript, web components with Declarative Shadow DOM can now be defined using HTML and CSS only.

So if Drupal was server-side rendering before it was cool, can we leverage Declarative Shadow DOM inserted into Single Directory Components to make Drupal cool again?