0.2.1 • Published 6 years ago
@acutejs/plugin-lit-html v0.2.1
@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-htmlNext, 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>`;
},
};