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
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
自動レビューエンジンの実装と運用 ~レビューのない世界へ~
kurukuru1999
1
110
AIを導入する前にやるべきこと
negima
2
370
~ 秘伝のタレ化した『神スプシ』と戦う ~ 関数型パラダイムで壊れない仕組みへ
h0r15h0
1
120
Modding RubyKaigi for Myself
yui_knk
0
310
検索設計から 推論設計への重心移動と Recall-First Retrieval
po3rin
5
1.7k
【ディップ|26年新卒研修資料】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
240
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
190
inferと仲良くなる10分間
ryokatsuse
1
120
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
1
190
AI時代だからこそ「Bloc」を採用する価値があるのかもしれない
takuroabe
0
200
プロパティの順序で型推論が壊れる!? TypeScript6.0の修正からContext-Sensitivityの仕組みを追う
bicstone
2
140
要はバランスからの卒業 #yumemi_grow
kajitack
0
170
Featured
See All Featured
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
Mind Mapping
helmedeiros
PRO
1
190
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
190
Being A Developer After 40
akosma
91
590k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Prompt Engineering for Job Search
mfonobong
0
310
Balancing Empowerment & Direction
lara
6
1.1k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
810
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
340
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?