1.0.1 • Published 2 years ago

uland v1.0.1

Weekly downloads
118
License
ISC
Repository
github
Last release
2 years ago

🦄 µland

CSP strict

tiny island

Social Media Photo by Ben Klea on Unsplash

micro land, or unicorn land, is a µhtml take at neverland.

📣 Community Announcement

Please ask questions in the dedicated discussions repository, to help the community around this project grow ♥


Same API, except the exports are {Component, render, html, svg}, where Component is a function you can use either as new Component(...) or just Component(...) which is the equivalent of neverland default export.

This module exports same utilities via uland/async, which is based on uhooks-dom/async for asynchronous hooks.

Announcement

Are you looking for something even more similar to React? Then don't miss 🐪 kaboobie out!

Are you looking for SSR components? Then check 🦄 µland-ssr out!

API

The concept is exactly the same as the neverland one, the render(...) accepts a node to render, and either a component or a callback that returns some content.

Live demo.

import {Component, render, html, useState} from 'uland';

const Counter = Component((initialState) => {
  const [count, setCount] = useState(initialState);
  return html`
  <button onclick=${() => setCount(count + 1)}>
    Count: ${count}
  </button>`;
});

// basic example, show two independent counters
render(document.body, () => html`
  <div>
    A bounce of counters.<hr>
    ${Counter(0)} ${Counter(1)}
  </div>
`);

Please check neverland to know more about this module usage.

1.0.1

2 years ago

1.0.0

2 years ago

0.12.0

2 years ago

0.10.3

3 years ago

0.11.0

3 years ago

0.10.1

3 years ago

0.10.2

3 years ago

0.10.0

3 years ago

0.9.1

3 years ago

0.9.0

3 years ago

0.8.3

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.3

3 years ago

0.6.2

3 years ago

0.6.1

3 years ago

0.6.0

3 years ago

0.5.5

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.2

3 years ago

0.5.1

3 years ago

0.5.0

3 years ago

0.4.5

3 years ago

0.4.3

3 years ago

0.4.2

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.5

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago