Lit element or Using class components

If I have to write bindings for this, how should we go about it

 import {html, css, LitElement} from 'lit';

export class SimpleGreeting extends LitElement {
  static styles = css`p { color: blue }`;

  static properties = {
    name: {type: String},
  };

  constructor() {
    super();
    this.name = 'Somebody';
  }

  render() {
    return html`<p>Hello, ${this.name}!</p>`;
  }
}
customElements.define('simple-greeting', SimpleGreeting);

To be clear, its not about consuming the component, but to write one.

1 Like

I’d wrap the class in a function factory and have written bindings for the function.

You can’t express those semantics in ReScript unfortunately.