Hyperapp — 1 KBのビューライブラリ

by JorgeBucaran
1 / 10

Who?


アジェンダ


logo-white-bg


What is Hyperapp?

Screen Shot 2017-05-27 at 18.41.33.png

  • :baby: Baby 2017年3月~
  • SPA/フロントエンドappを作るためのJavaScriptライブラリ
  • React, Preact, Inferno, Ember, Vueなどに似てる
  • Hyperapp = Virtual DOM + Redux/Elm的なState管理 + Router
  • ~1KB gzip
  • :fire: Fast → Benchmarks

Why?

  • ReactやVueはframeworkっぽ過ぎ
  • ミニマルなVirtual DOMエンジンが欲しかった

How does it work?

Demo

app({
  state: 0,
  actions: {
    add: state => state + 1,
    sub: state => state - 1
  },
  view: (state, actions) =>
    <div>
      <button onclick={actions.add}>+</button>
      <h1>{state}</h1>
      <button onclick={actions.sub} disabled={state <= 0}>-</button>
    </div>
})

Differences with other libraries


What next?


Thanks! :wave: