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
420
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React-Haskell
Khan Academy dev standup presentation.
https://github.com/joelburget/react-haskell
Joel Burget
November 19, 2014
More Decks by Joel Burget
See All by Joel Burget
Backbone to React
joelburget
24
67k
Other Decks in Programming
See All in Programming
JavaDoc 再入門
nagise
0
320
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
710
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
2k
例外の正しい扱い方 そのエラー try-catchして大丈夫?
jinwatanabe
0
220
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.3k
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
150
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
5.5k
CSC307 Lecture 17
javiergs
PRO
0
320
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
260
New "Type" system on PicoRuby
pocke
1
840
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2k
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
390
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
430
sira's awesome portfolio website redesign presentation
elsirapls
0
280
First, design no harm
axbom
PRO
2
1.2k
My Coaching Mixtape
mlcsv
0
140
Site-Speed That Sticks
csswizardry
13
1.2k
New Earth Scene 8
popppiees
3
2.3k
The SEO identity crisis: Don't let AI make you average
varn
0
490
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
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?