Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
昔Reactで書いたコードをHyperappに移植した話 / Porting react to...
Search
Yuuki Sumida
September 01, 2018
Programming
290
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
昔Reactで書いたコードをHyperappに移植した話 / Porting react to hyperapp
https://gbdaitokai.connpass.com/event/94404/
Yuuki Sumida
September 01, 2018
More Decks by Yuuki Sumida
See All by Yuuki Sumida
stddev_popとstddev_sampの話 / stddev_pop and stddev_samp
razon
0
740
Monacaのビルド結果をSlackに通知したいマン[WIP] / Notify Monaca build results to Slack [WIP]
razon
0
490
ノベルティカンファレンス in 地方 / Novelty conference in local region
razon
0
900
おれたちのファイナルファンタジー勉強会 アンケート / Final Fantasy Survey
razon
1
300
フロントエンドわからなさすぎるのでVue CLIが吐き出すファイルを読む / Read the files generated by Vue CLI
razon
0
1.1k
今の飲みは次の飲みへ[完結編] / For the current drinking party to the next drinking party -final version-
razon
0
82
今の飲みは次の飲みへ / For the current drinking party to the next drinking party
razon
0
77
大都会アワード2017 / Daitokai awards 2017
razon
0
960
合体事故した話
razon
0
720
Other Decks in Programming
See All in Programming
バグを直したら useEffect が消えた
colorful12
3
760
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
340
<title><a id="</title>君はこのHTMLをパースできるか"></a></title> #雑LT_study
pizzacat83
0
180
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
110
Discordを用いたラボオートメーション関連情報収集の自動化
noguhiro2002
0
460
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
560
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.1k
ドリフトを絶対に許さない(?)CDK運用 / CDK Ops with Zero Tolerance for Drifts (?)
akihisaikeda
1
240
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
Featured
See All Featured
The Curious Case for Waylosing
cassininazir
1
480
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
580
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
580
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
240
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.4k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
390
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Transcript
昔 R e a c t で 書 い た
コ ー ド を H y p e r a p p に 移 植 し た 話 合 同 勉 強 会 i n ⼤ 都 会 岡 ⼭ - 2 0 1 8 S u m m a e r - # g b d a i t o k a i
A B O U T M E Yuuki Sumida(@razon) Information
Network co.,ltd
昔 R e a c t で 書 い た
コ ー ド を H y p e r a p p に 移 植 し た 話 合 同 勉 強 会 i n ⼤ 都 会 岡 ⼭ - 2 0 1 8 S u m m a e r - # g b d a i t o k a i
React Hyperapp …今更説明するまでもないよね? https://github.com/hyperapp/hyperapp 軽量 コアは398⾏ exportされている関数はhとappのふたつのみ
import { h, app } from "hyperapp" const state =
{ count: 0 } const actions = { down: value => state => ({ count: state.count - value }), up: value => state => ({ count: state.count + value }) } const view = (state, actions) => ( <div> <h1>{state.count}</h1> <button onclick={() => actions.down(1)}>-</button> <button onclick={() => actions.up(1)}>+</button> </div> ) app(state, actions, view, document.body) State Actions View
https://kampa.me/
State
Actions
View
移植してみて(完⾛した感想) 割と楽勝だった (Viewの互換性が⾼かったおかげ?) 規模あんまり⼤きくないんだけどもういい加減直接DOM いじるのはからい、みたいなところによさそう!
カ ン パ お 願 い し ま す ま
と め 終 @razon