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
Immutable.js with Flowtype
Search
Takumi Ohashi
July 14, 2017
0
7.1k
Immutable.js with Flowtype
Takumi Ohashi
July 14, 2017
Tweet
Share
More Decks by Takumi Ohashi
See All by Takumi Ohashi
freee Tech Night #2 会計freee 7年目のフロントエンド開発
tohashi
1
7.9k
How to control loading state in React
tohashi
2
190
フロントエンドのモダン化とJavaScriptモジュールの 依存解決
tohashi
8
2.9k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
A Modern Web Designer's Workflow
chriscoyier
693
190k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Faster Mobile Websites
deanohume
305
30k
A designer walks into a library…
pauljervisheath
204
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
Building Adaptive Systems
keathley
38
2.3k
We Have a Design System, Now What?
morganepeng
50
7.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Embracing the Ebb and Flow
colly
84
4.5k
It's Worth the Effort
3n
183
27k
Transcript
Immutable.js with Flowtype @_tohashi
୭ • Takumi Ohashi • twitter: @_tohashi • GitHub: @tohashi
• ϑϦʔʢגʣͷΤϯδχΞ
ίϯϙʔωϯτࢦʢReactʣ ୯ҰํͷσʔλϑϩʔʢFluxʣ ܕγεςϜʢFlowtypeʣ
Λܦͨਓ͕ؒ ࣍ʹٻΊ͕ͪͳͷ
Πϛϡʔλϒϧ
Immutable.js • FacebookͷΠϛϡʔλϒϧͳΦϒδΣΫτ Λѻ͏ͨΊͷϥΠϒϥϦ • 2014͔Β͋Δ • ReactFlowtype΄Ͳʹͳͬͯͳ͍͠ ΘΕͯͳ͍ҹ
Why Immutable.js?
Why Immutable.js? • ෭࡞༻ͷগͳ͍ΦϒδΣΫτૢ࡞ • ΤϯςΟςΟૢ࡞ϩδοΫͷ • ϨϯμϦϯά੍ʹΑΔύϑΥʔϚϯενϡʔ χϯά
෭࡞༻ͷগͳ͍ΦϒδΣΫτૢ ࡞
෭࡞༻ͷগͳ͍ΦϒδΣΫτૢ ࡞
ΤϯςΟςΟૢ࡞ͷ
Immutable Model Class • ʹ
ΤϯςΟςΟૢ࡞ͷ
ෆཁͳϨϯμϦϯάͷ੍
ݒ೦
େن։ൃͳΒܕ͕΄͍͠
Immutable.js + Flowtype
it should ͍͍ײ͡ʹ ܕ͕͍ͭͨΠϛϡʔλϒϧͳ ΦϒδΣΫτΛѻ͑ͯ࠷ߴ
FlowtypeʹΑΔܕఆٛ
FlowtypeʹΑΔܕఆٛ
Immutable.Recordͷܕఆٛ
ͦΕҎલͷͱ͜ΖͰΤϥʔ
ܕఆٛϑΝΠϧΛௐΔ
ผ్ΫϥεఆٛΛ༻ҙ͢Δ
ͦͷ্ͰܧঝલʹΩϟετ
ظ௨ΓͷΤϥʔ
ͳΜͱ͔ ܕ͚Ͱ͖ͨ
͔ʹࢥ͕͑ͨ
None
Immutable.jsͷܕఆٛ • ίϝϯτΞτ෦ͷΑ͏ͳهड़ݱঢ়Ͱ͖ͳ͍
None
Immutable.js + Flowtype
it should ͍͍ײ͡ʹ ܕ͕͍ͭͨΠϛϡʔλϒϧͳ ΦϒδΣΫτΛѻ͑ͯ࠷ߴ
- ͍͍ײ͡ + ͭΒ͍ - ࠷ߴ + ยखམͪ 2 failure
ݟ • Immutable.Record + Flowtype ͭΒ͍ • ࡶͳهड़ͷʹܕ҆શͰͳ͍ • IssueݟΔͱօಉ༷ͷΛ๊͍͑ͯΔ
• ͍͔ͭ͘ͷղܾͷஹ͠ • ಉࣾ͡ͷOSSͳΒେৎͩΖ͏Έ͍ͨͳࡶͳߟ͑Α͘ ͳ͍
͋Γ͕ͱ͏͍͟͝·ͨ͠
versions •
[email protected]
• fl
[email protected]