By the end of this step, you'll be able to set an attribute words on your word-viewer, which Lit will set to a property on your WordViewer class.

<word-viewer words="👋.from.html"></word-viewer>

This can be achieved with a Lit feature called Reactive Properties. Define a reactive property words:

Lit Reactive Properties are special properties that can interact with Lit's render lifecycle. If the reactive property words changes, the component schedules an update. By default, Lit sets up attribute synchronization for the property and will update the property when the attribute changes.

You should now see initial value in the preview.

Before moving on, change to the index.html file and set words from an attribute.

The preview should now show 👋.from.html.

Debugging Custom Elements is awesome!

Custom Elements are like any other HTML Element, so your browser's development tools already understand how to handle them!

Change the words attribute in your browser's developer tools and note that the component reacts to the change.