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-Haskell
Search
Joel Burget
November 19, 2014
Programming
3
410
React-Haskell
Khan Academy dev standup presentation.
https://github.com/joelburget/react-haskell
Joel Burget
November 19, 2014
Tweet
Share
More Decks by Joel Burget
See All by Joel Burget
Backbone to React
joelburget
24
67k
Other Decks in Programming
See All in Programming
テストコード文化を0から作り、変化し続けた組織
kazatohiei
2
1.4k
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
4
860
採用事例の少ないSvelteを選んだ理由と それを正解にするためにやっていること
oekazuma
2
970
iOS18とヘルスケアの睡眠対応
takuyaosawa
0
110
MCP with Cloudflare Workers
yusukebe
2
200
N.E.X.T LEVEL
pluu
2
290
fs2-io を試してたらバグを見つけて直した話
chencmd
0
120
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
110
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.1k
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
160
【re:Growth 2024】 Aurora DSQL をちゃんと話します!
maroon1st
0
740
TypeScript でバックもやるって実際どう? 実運用で困ったこと3選
yuichiro_serita
17
7.7k
Featured
See All Featured
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
The Pragmatic Product Professional
lauravandoore
32
6.3k
Unsuck your backbone
ammeep
669
57k
The Cult of Friendly URLs
andyhume
78
6.1k
How STYLIGHT went responsive
nonsquared
95
5.2k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.2k
Agile that works and the tools we love
rasmusluckow
328
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
The Language of Interfaces
destraynor
154
24k
Transcript
None
REACT-HASKELL
HI, MY NAME IS JOEL
HI, MY NAME IS JOEL ... AND I USE HASKELL
HASKELL ▸ statically typed ▸ lazy ▸ purely functional
HASKELL ▸ statically typed ▸ lazy ▸ purely functional ▸
really cool
HASTE ▸ dialect of Haskell ▸ runs in browser
HASTE
BLAZE-HTML sample :: Html sample = p ! class_ "styled"
$ em "Basic Algebra" becomes <p class="styled"> <em>Basic Algebra</em> </p>
REACT-HASKELL sample :: React sample = p <! className "styled"
$ em "Basic Algebra" becomes <p class="styled"> <em>Basic Algebra</em> </p>
PUT IT ON THE PAGE main :: IO () main
= do Just elem <- elemById "id" render elem sample
MORE COMPLICATED sample :: React sample = div <! className
"beautify" $ do "Khan Academy" input "Rewritten in Haskell"
CONTROLLED COMPONENT view :: Elem -> JSString -> IO ()
view elem str = render elem $ div $ do "Khan Academy" input <! onChange (view elem . targetValue) text str
None
LET'S MAKE THAT EASIER
STATEFUL COMPONENT REDUX view :: StatefulReact JSString view = div
$ do "Khan Academy" input <! onChange' (updateState . targetValue) text str
LIFECYCLE METHODS componentDidMount, componentWillUnmount, ... ?
QUESTIONS?