@acutejs/plugin-lit-html

0.2.1 • Public • Published

@acutejs/plugin-lit-html

A plugin for Acute to use lit-html.

Usage

First, install the plugin and its peer-dependency, lit-html.

npm install @acutejs/plugin-lit-html lit-html

Next, pass the plugin and a reference to lit-html’s render function to Acute’s createApp().

import litHtml from '@acutejs/plugin-lit-html';
import { render } from 'lit-html';

createApp({
  // ...
  plugins: [
    litHtml({
      render,
    }),
  ],
});

Finally, use lit-html’s html function to tag the template string in your components render() function.

import { html } from 'lit-html';

const message = 'Hello, world';

export default {
  render() {
    return html`<p> ${message} </p>`;
  },
};

Readme

Keywords

none

Package Sidebar

Install

npm i @acutejs/plugin-lit-html

Weekly Downloads

4

Version

0.2.1

License

MIT

Unpacked Size

2.69 kB

Total Files

5

Last publish

Collaborators

  • liamnewmarch