@rhjs/rh
TypeScript icon, indicating that this package has built-in type declarations

0.2.2 • Public • Published

rh.js

size badge language version

🧩 Lightweight & Powerful framework

FEATURES:

  • Packed main.js only ~15kb
  • Based on @vue/reactivity
  • function component patterns
  • Not extras syntax, all in js.
  • No VDom, always dom.
  • JSX style

Table of Contents

Quick Start

<script type="importmap">
{
  "imports": {
    "@rhjs/core": "https://unpkg.com/@rhjs/rh@latest/dist/main.module.mjs",
    "@rhjs/builtin": "https://unpkg.com/@rhjs/builtin@latest/dist/main.module.mjs",
    "@rhjs/tag": "https://unpkg.com/@rhjs/tag@latest/dist/main.module.mjs"
  }
}
</script>
<div id="app"></div>
<script type="module">
  import {mount, createState} from "@rhjs/core";
  import {html} from "@rhjs/tag";

  const [count, setCount] = createState(0);
  
  mount('#app', html`
    <h1>Counter</h1>
    <button onclick=${() => setCount(c => c + 1)}>${count}</button>
  `);
</script>

More @Rhjs Details

Related Efforts

  • lit-element A simple base class for creating fast, lightweight web components
  • alpine A rugged, minimal framework for composing JavaScript behavior in your markup.
  • petite-vue 6kb subset of Vue optimized for progressive enhancement
  • solid A declarative, efficient, and flexible JavaScript library for building user interfaces.

Maintainers

@zhzluke96

Contributing

Feel free to dive in! Open an issue or submit PRs.

LICENSE

Code is licensed under the Apache License 2.0.

Package Sidebar

Install

npm i @rhjs/rh

Weekly Downloads

0

Version

0.2.2

License

MIT

Unpacked Size

453 kB

Total Files

11

Last publish

Collaborators

  • luke_zhang