Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthewp/fritz
Take your UI off the main thread
https://github.com/matthewp/fritz
framework javascript webcomponents workers
Last synced: 26 days ago
JSON representation
Take your UI off the main thread
- Host: GitHub
- URL: https://github.com/matthewp/fritz
- Owner: matthewp
- Created: 2016-11-30T23:20:29.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T23:31:20.000Z (almost 2 years ago)
- Last Synced: 2025-01-04T20:02:36.781Z (about 1 month ago)
- Topics: framework, javascript, webcomponents, workers
- Language: JavaScript
- Homepage: https://fritz.work
- Size: 2.01 MB
- Stars: 41
- Watchers: 3
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fritz
A library for rendering custom elements in a web worker.
**worker.js**
```js
import { Component, h } from 'fritz';class Hello extends Component {
static get props() {
return {
name: { attribute: true }
}
}render({name}) {
return (
Hello {name}
);
}
}fritz.define('x-hello', Hello);
```**index.html**
```html
My App
import fritz from '//unpkg.com/fritz@next/window.js';
fritz.use(new Worker('./worker.js'));
```
## Install
Using [Yarn](https://yarnpkg.com/en/):
```shell
yarn add fritz
```Using npm:
```shell
npm install fritz
```## License
BSD 2 Clause