Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 875 Bytes

README.md

File metadata and controls

36 lines (25 loc) · 875 Bytes

EchoX: UI = f(DOM, Reactive)

Note

Work in progress. The APIs are not stable right now.

The lightweight reactive UI framework for declarative DOM manipulation, alternative to React, Vue and jQuery for small projects.

import {html, reactive} from "echox";

const state = reactive()
  .state("value", 0)
  .computed("double", (d) => d.value * 2)
  .effect((d) => console.log(d.value, d.double))
  .join();

const counter = html.div([
  html.button({onclick: () => state.value++}, ["👍"]),
  html.button({onclick: () => state.value--}, ["👎"]),
  html.span([state.select("value")]),
]);

document.body.appendChild(counter);

Resources 📚

License 📄

MIT@Bairui SU