0.2.1 • Published 4 years ago

@acutejs/plugin-lit-html v0.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@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>`;
  },
};
0.2.1

4 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.1

5 years ago