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
Redux(浅)
Search
S-cubism
September 29, 2017
0
46
Redux(浅)
S-cubism
September 29, 2017
Tweet
Share
More Decks by S-cubism
See All by S-cubism
WSLでreactの開発環境作った話
scubism
0
610
未経験者がAndroidアプリをリリースするまで
scubism
0
85
scubism_LT_20180223_細田謙二_イベントソーシング
scubism
0
130
REVEAL.JSをちょっとだけ使ってみた
scubism
0
240
忙しい人のための仮想通貨
scubism
0
81
サーバ作業の注意コマンド
scubism
0
93
最近勉強してること、次にやりたいこと
scubism
0
82
FOOD TECH
scubism
0
46
Firebase(Realtime Database)について
scubism
0
100
Featured
See All Featured
Building Adaptive Systems
keathley
32
1.9k
Scaling GitHub
holman
457
140k
What's new in Ruby 2.0
geeforr
337
31k
KATA
mclloyd
16
12k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
It's Worth the Effort
3n
180
27k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
The Invisible Side of Design
smashingmag
294
49k
Stop Working from a Prison Cell
hatefulcrawdad
267
19k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Transcript
Redux(ઙ) ΤεΩϡʔϏζϜٕࣾज़LT tatsu
͜Εʹؔͯ͠ޠΒͶͳΓ·͢·͍ Redux stateΛཧ͢ΔϑϨʔϜϫʔΫ react onlyͱݶΒͳ͍…ͱ͍͑reactͱηοτͰ༻͞ΕΔ͜ͱ͕ଟ͍Β͍͠ state?
ReduxͷϑϧΥʔ(Flow) store view action creator reducer ViewͷೖྗͳͲ͔ΒActionCreator͕ActionΛ࡞ɻ ࡞͞ΕͨActionΛStoreDispatch͠มߋΛ͑Δɻ StoreݱStateͱActionΛReducerʹ͠ɺ ฦ͖ͬͯͨ৽StateΛอ࣋͢Δɻ
ͦͯ͠Stateͷߋ৽ʹΑͬͯΠϕϯτ͕ΓViewͷߋ৽ͳͲ͕͞ΕΔɻ …͍ʁ
ϝϯόʔΛհ͢Δͥᾇ ~THE γϯϓϧγϦʔζ~ Action Creator ActionΛ࡞͢Δ Action ಈ࡞Λ࣋ͬͨΦϒδΣΫτ
ϝϯόʔΛհ͢Δͥᾈ Store StateΛҰݩཧ ԼهͷͷΛอ࣋orఏڙ State ΞϓϦέʔγϣϯͷঢ়ଶɻϑΥʔϜͷλϒͷબঢ়ଶͳͲɻ Dispatch StoreʹAction(͍ͨ͠ࣄ)Λ͑Δ Reducer ड͚औͬͨActionͱݱState͔Βɺͨͩ৽͍͠StateΛฦ͢
࠶ɿReduxͷϑϧΥʔ(Flow) store view action creator reducer ViewͷೖྗͳͲ͔ΒActionCreator͕ActionΛ࡞ɻ ࡞͞ΕͨActionΛStoreDispatch͠มߋΛ͑Δɻ StoreݱStateͱActionΛReducerʹ͠ɺ ฦ͖ͬͯͨ৽StateΛอ࣋͢Δɻ
ͦͯ͠Stateͷߋ৽ʹΑͬͯΠϕϯτ͕ΓViewͷߋ৽ͳͲ͕͞ΕΔɻ ҊͣΔΑΓ࢈Ή͕қ͠ʂ
༨ஊ mobxɹstateΛཧ͢ΔϑϨʔϜϫʔΫ https://qiita.com/Takepepe/items/8172333655442314eb55 react-navigationɹϧʔςΟϯάϥΠϒϥϦ https://reactnavigation.org/ formicɹϑΥʔϜͷϥΠϒϥϦ https://github.com/jamiecopeland/react-formic mobx+react-navigation http://www.workabroad.jp/posts/2206