1 What could be the future of web Module federation and web components 2 Agenda Web components What it is? Current status Module federation What it is? When to use it How to use it Project update 3 Web components - what it is? ● Web Components is a suite of different technologies allowing you to create reusable custom elements ○ Standardized way of sharing components ● Custom elements ○ JS API to define custom elements ● Shadow DOM ○ API to encapsulate your component so it doesn’t break other components ● HTML templates ○ Markup language, that is not displayed in the rendered page. Can be reused Perfect guide with examples https://developer.mozilla.org/en-US/docs/Web/Web_Components 4 Custom elements ● You can define custom element by calling CustomElementRegistry.define() ○ First argument is name of the component ○ Second argument is class attached to said component ○ Third argument is options 5 Shadow DOM ● Shadow host - regular DOM node to which shadow dom is attached to ● Shadow boundary - boundaries component can change ● Shadow tree - similar to regular DOM structure ● Shadow root - the root of a shadow dome (similar to HTML tag) 6 Templates and slots ●