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
7k
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
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Why You Should Never Use an ORM
jnunemaker
PRO
53
9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
What's in a price? How to price your products and services
michaelherold
243
12k
Designing the Hi-DPI Web
ddemaree
280
34k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
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]