4 ms·
Have you heard of hyperapp? From the official [0][@hyperapp/html]: import { app } from "https://unpkg.com/hyperapp"; import { main, h1,
by my_throwaway23 9mo ago
Have you heard of hyperapp?
From the official [0][@hyperapp/html]:
import { app } from "https://unpkg.com/hyperapp";
import {
main,
h1,
button,
text,
} from "https://unpkg.com/@hyperapp/html?module";
const Subtract = (state) => ({ ...state, count: state.count - 1 });
const Add = (state) => ({ ...state, count: state.count + 1 });
const page = ({count}) =>
main([
h1(text(count)),
button({ onclick: Subtract }, text("-")),
button({ onclick: Add }, text("+")),
]);
app({
init: (count = 0) => ({ count }),
view: page,
node: document.getElementById("app"),
})
I can't imagine building anything anymore with the overly verbose bloat that is React.
[0]: https://github.com/jorgebucaran/hyperapp/tree/main/packages/html https://github.com/jorgebucaran/hyperapp/tree/main/packages/...
- hu3 9mo agothis is great! and looks like https://mithril.js.org https://mithril.js.org