mix live_state.gen.element (live_state v0.9.0)

Generates a LiveState connected custom element (using the lit library).

$ mix live_state.gen.element ContactForm contact-form

Accepts the LiveState channel name and a tag name for the custom element.

The generator will:

  • add a custom element file in assets/js
  • add library dependencies to assets/js/package.json