hyperapp

async/await

by gbos

HTML

<script src="https://unpkg.com/[email protected]/umd/react.production.min.js"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.production.min.js"></script>
<h1>test</h1>
<div id="app"></div>

CSS

.title {
    color: red;
}

Babel + JSX

const {render} = ReactDOM;

render(<h1 className="title">react</h1>, document.getElementById('app'));


//const { h, app } = hyperapp

//const Title = () => <h1>Title</h1>;

/*
      app({
        init: () => 0,
        view: state =>
          h("div", {}, [
            h("h1", {}, state),
            h("button", { onClick: state => state - 1 }, "-"),
            h("button", { onClick: state => state + 1 }, "+")
          ]),
        node: document.getElementById("app")
      });
*/