@skatejs/element-preact
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

element-preact

SkateJS renderer for Preact.

Install

npm i @skatejs/element-preact preact

Usage

import Element, { h } from '@skatejs/element-preact';

class Hello extends Element {
  render() {
    return (
      <span>
        Hello, <slot />!
      </span>
    );
  }
}

customElements.define('x-hello', Hello);
<x-hello>World</x-hello>

Package Sidebar

Install

npm i @skatejs/element-preact

Weekly Downloads

250

Version

0.0.1

License

MIT

Unpacked Size

6.22 kB

Total Files

6

Last publish

Collaborators

  • treshugart