> TLDR; See [quick start example](#minimal-example) you can copy-paste and modify Web Component Base --- This is a very minimal base class for creating reactive custom elements easily. When you extend the `WebComponent` class for your component, you only have to define the `template()` and `observedAttributes()`, and changes in any attribute value will automatically cause the UI to render. The result is a reactive UI on attribute changes. ## Table of Contents 1. [Vanilla JS import](#vanilla-js-import) 1. [Installation](#installation) 1. [Usage](#usage) 1. [Minimal Example](#minimal-example) - Quick start you can copy-paste 😉 1. [Life-Cycle Hooks](#life-cycle-hooks) 1. [`onInit`](#oninit) - the component is connected to the DOM 1. [`onChanges`](#onchanges) - an attribute value changed ## Vanilla JS import Import using [unpkg](https://unpkg.com/web-component-base) in your component. We will use this in the rest of our [usage examples](#usage). ```js import WebComponent from "https://unpkg.com/web-component-base"; ``` ## Installation If you have a bundler to help resolving imports: ```bash npm i web-component-base ``` ## Usage In your component class: ```js // HelloWorld.mjs import WebComponent from "https://unpkg.com/web-component-base"; class HelloWorld extends WebComponent { name = "World"; emotion = "excited"; static get observedAttributes() { return ["name", "emotion"]; } get template() { return `