0.0.2 • Published 5 years ago

@atomico/uranio v0.0.2

Weekly downloads
-
License
-
Repository
github
Last release
5 years ago

@atomico/uranio

npm gzip

Small experiment that removes the layer of Hooks, Hooks, Functional Components and the context of @atomico/core. to only work within web-component.

import { h, Element } from "@atomico/uranio";

class Counter extends Element {
	static observables = {
		value: Number
	};
	increment() {
		this.value += 1;
	}
	decrement() {
		this.value -= 1;
	}
	render() {
		return (
			<host shadowDom>
				<style>{`:host{display:block;padding:1rem}`}</style>
				<button onClick={this.increment}>increment</button>
				<span>::{this.value}::</span>
				<button onClick={this.decrement}>decrement</button>
			</host>
		);
	}
}

customElements.define("uranio-counter", Counter);
0.0.2

5 years ago

0.0.1

5 years ago

0.0.0

5 years ago