Who?
-
ジョージ
- エンジニア at Qiita+Increments
- @JorgeBucaran
- 今まで作ってきた OSS は?
アジェンダ
- What is Hyperapp?
- Why Hyperapp?
- How does it work?
- Differences with other libraries
- What next?
What is Hyperapp?
-
Baby 2017年3月~
- SPA/フロントエンドappを作るためのJavaScriptライブラリ
- React, Preact, Inferno, Ember, Vueなどに似てる
- Hyperapp = Virtual DOM + Redux/Elm的なState管理 + Router
- ~1KB gzip
-
Fast → Benchmarks
Why?
- ReactやVueはframeworkっぽ過ぎ
- ミニマルなVirtual DOMエンジンが欲しかった
- virtual-dom息をしていない??
-
snabbdom or domvm
- 100ポケットあるジャケット
-
hyperscript-style vnode factory function
h
と相性イマイチ
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
"dependencies": {}
- Redux/Elm的なState管理
- 十分にハイパフォーマンス
- 短い~300行
What next?
- requestAnimationFrame
- Server Side Rendering
- REPL