@acutejs/plugin-lit-html
v0.2.1
Published
A plugin for Acute to use [lit-html](https://lit-html.polymer-project.org).
Downloads
14
Readme
@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>`;
},
};