diff --git a/packages/renderers/renderer-lit/readme.md b/packages/renderers/renderer-lit/readme.md index 91ae2f390..ed36f9dbd 100644 --- a/packages/renderers/renderer-lit/readme.md +++ b/packages/renderers/renderer-lit/readme.md @@ -36,13 +36,15 @@ __src/components/my-element.js__ ```js import { LitElement, html } from 'lit'; -export const tagName = 'my-counter'; - -class Counter extends LitElement { +export const tagName = 'my-element'; +class MyElement extends LitElement { + render() { + return html`
Hello world! From my-element
`; + } } -customElements.define(tagName, Counter); +customElements.define(tagName, MyElement); ``` > Note that exporting the `tagName` is __required__ if you want to use the tag name in your templates. Otherwise you can export and use the constructor, like with non custom element frameworks.