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
8k
How to control loading state in React
tohashi
2
190
フロントエンドのモダン化とJavaScriptモジュールの 依存解決
tohashi
8
3k
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
KATA
mclloyd
29
14k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
920
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
820
Building Your Own Lightsaber
phodgson
103
6.1k
GitHub's CSS Performance
jonrohan
1031
460k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How STYLIGHT went responsive
nonsquared
96
5.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Making Projects Easy
brettharned
116
6k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
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]