Package Exports
- fritz
- fritz/window
Readme
fritz
A library for rendering custom elements in a web worker.
worker.js
import { Component, h } from 'fritz';
class Hello extends Component {
static get props() {
return {
name: { attribute: true }
}
}
render({name}) {
return (
<span>Hello {name}</span>
);
}
}
fritz.define('x-hello', Hello);index.html
<!doctype html>
<html lang="en">
<title>My App</title>
<x-hello name="world"></x-hello>
<script type="module">
import fritz from '//unpkg.com/fritz@next/window.js';
fritz.use(new Worker('./worker.js'));
</script>Install
Using Yarn:
yarn add fritzUsing npm:
npm install fritzLicense
BSD 2 Clause