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
状態管理ライブラリZustandの導入から運用まで
Search
daiki
September 06, 2024
Programming
3
530
状態管理ライブラリZustandの導入から運用まで
daiki
September 06, 2024
Tweet
Share
Other Decks in Programming
See All in Programming
ヤプリ新卒SREの オンボーディング
masaki12
0
130
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
CSC509 Lecture 11
javiergs
PRO
0
180
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
170
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
890
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
100
Outline View in SwiftUI
1024jp
1
330
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
EventSourcingの理想と現実
wenas
6
2.3k
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Writing Fast Ruby
sferik
627
61k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Building Adaptive Systems
keathley
38
2.3k
Scaling GitHub
holman
458
140k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Transcript
ঢ়ଶཧϥΠϒϥϦ;VTUBOEͷಋೖ͔Βӡ༻·Ͱ EBJLJ!LUJLVSJTV$ZCP[V*OD
EBJLJ • αΠϘζגࣜձࣾ৽ଔ • 8FCϑϩϯτΤϯυΤϯδχΞ • 𝕏 ɿ!LUJLVSJTV
αΠϘζͷओྗLJOUPOF αΠϘζΤϯδχΞ࠾༻ϐον<> <>IUUQTTQFBLFSEFDLDPNDZCP[VJOTJEFPVUDZCP[VFOHJOFFSSFDSVJU TMJEF
LJOUPOFͷϑΥʔϜͷঢ়ଶཧʹ;VTUBOEΛ͍ͬͯΔ LJOUPOFͰ࡞ͨ͠ΞϓϦʹσʔλΛՃ͢Δը໘ ίίʹ;VTUBOE͕ʂ
ΞδΣϯμ • ঢ়ଶཧʹ;VTUBOEΛ࠾༻ͨ͠എܠ • ͬ͘͟Γ;VTUBOE • ;VTUBOEΛಋೖͯ͠Έ࣮ͯࡍͲ͏͔ • ;VTUBOEWͷظ
ঢ়ଶཧʹ;VTUBOEΛ࠾༻ͨ͠എܠ
࠶ϨϯμϦϯά࠷దԽͷ՝ײ
࠶ϨϯμϦϯά࠷దԽͷ՝ײ • ͱͱ3FBDUͷVTF4UBUFVTF3FEVDFSͰঢ়ଶཧΛ͍ͯͨ͠ • ϑΥʔϜͷঢ়ଶΛͭͷΦϒδΣΫτͱͯ͠ཧ͓ͯ͠Γɺಛผ੍ޚ ͠ͳ͚ΕͭͷJOQVUͷΛߋ৽͢Δ͚ͩͰϑΥʔϜશମ͕࠶Ϩϯ μϦϯά͞ΕΔ ◦ ϑΥʔϜશମͷ༨ͳϨϯμϦϯάΛආ͚ΔͨΊʹ࣮͕ෳࡶԽ ͢Δ
ˠൺֱత༰қʹ࠶ϨϯμϦϯάͷ੍ޚ͕Մೳͳঢ়ଶཧϥΠϒϥϦͷಋೖ ʹࢸͬͨ
ϥΠϒϥϦબఆͷ۩ମతͳཁ݅ • ঢ়ଶཧʹಛԽ͍ͯ͠Δ ◦ طଘίʔυͱาௐΛ߹ΘͤΔඞཁ͕͋Δ • όϯυϧαΠζ͕খ͘͞ґଘύοέʔδ͕গͳ͍ ◦ LJOUPOFେنͳϓϩμΫτͷͨΊɺྦྷੵతʹେ͖ͳӨڹΛ༩ ͑Δ
• ͋ΔఔͷγΣΞͷߴ͞ͱܧଓతͳ։ൃ͕ೝΊΒΕΔ
ঢ়ଶཧϥΠϒϥϦͷҟͳΔΞϓϩʔν
τοϓμϯతͳΞϓϩʔνɿ;VTUBOEɺ3FEVY SPPU DPNQPOFOU DPNQPOFOU DPNQPOFOU DPNQPOFOU • 4JOHMF4UPSF •
தԝूݖతʹཧ͞Εͨ4UPSFΛ֤ DPNQPOFOUͰݺͼग़ͯ͠༻͢Δ 4UPSF
ϘτϜΞοϓతͳΞϓϩʔνɿ+PUBJɺ3FDPJM SPPU DPNQPOFOU DPNQPOFOU DPNQPOFOU DPNQPOFOU "UPN • "UPNͱݺΕΔখ͞ͳঢ়ଶ୯ҐΛج
ຊͱ͢Δ • ֤"UPNಠཱ͓ͯ͠ΓɺඞཁʹԠ͡ ͯΈ߹ΘͤΔ͜ͱ͕Ͱ͖Δ ◦ ࠷খ୯Ґ͔Β࢝Ίͯঃʑʹେ͖ͳ ߏΛ࡞Γ্͛ΔϘτϜΞοϓత ͳߟ͑ํ "UPN
ϥΠϒϥϦൺֱͷҰ෦ • ;VTUBOEˠ࠾༻ ◦ ଞͷJOQVUͷʹԠͯ͡ผͷJOQVUͷ͕࠶ܭࢉ͞ΕΔ͜ͱ͕͋ Γɺ·ͱΊͯঢ়ଶཧͰ͖ΔτοϓμϯͷΞϓϩʔν͕ద͢Δ • +PUBJ ◦ ࠓճͷཁ݅Ͱ͏·͘4UBUFΛϘτϜΞοϓʹׂ͢Δͷ͕͍͠
• 3FEVYUPPMLJU ◦ SFBDUSFEVYͱ!SFEVYKTUPPMLJUͷґଘ͕૿͑Δ ◦ 1SPWJEFSΛՃ͢ΔͷͰɺطଘͷςετίʔυΛมߋ͢Δඞཁ͕ ͋Δ
ͬ͘͟Γ;VTUBOE
;VTUBOEͱʁ • ʮγϯϓϧͰܰྔͳγϯάϧετΞͷঢ়ଶཧϥΠϒϥϦʯ • ϝΠϯͷ+4ίʔυेߦ΄Ͳ • όϯυϧαΠζLCఔʢNJOJGJFEʣ *OUSPEVDUJPO;VTUBOEɿIUUQT[VTUBOEEPDTQNOEST
;VTUBOEͰͷ4UPSFఆٛ DSFBUFͱ͍͏͔ؔΒશͯ࢝·Δ
;VTUBOEͰͷ4UPSFఆٛ • DSFBUFؔͷҾʹɺTFU HFU TUPSF ΛҾʹऔΔίʔϧόοΫΛ͢ • Γ͕4UPSFΛѻ͏ͨΊͷ)PPLʹͳ
Δ
ίʔϧόοΫঢ়ଶมʢ4UBUFʣͱͦͷ ߋ৽ؔʢ"DUJPOʣΛఆٛͨ͠ΦϒδΣ ΫτΛฦ͢ ;VTUBOEͰͷ4UPSFఆٛ
ίϯϙʔωϯτͰ4UPSFΛࢀর )PPLΛݺͼग़͠ɺཉ͍͠ 4UBUF·ͨ"DUJPOΛબ͢ Δʢ4FMFDUPSʣ ड͚औͬͨ4UBUF"DUJPOΛ ར༻͢Δ
5ZQF4DSJQUͰͷར༻ํ๏ 4UBUFͱ"DUJPOͷܕΛ༻ҙ͢ Δ DSFBUFؔͷܕҾʹ͢
࣮ࡍͷӡ༻ํ๏ɾͳͲ
• ঢ়ଶߋ৽͕ෳࡶ • ϑΥʔϜશମΛͭͷΦϒδΣΫτͱͯ͠ ѻ͍ͬͯΔͨΊɺ·͞ʹ͜Μͳײ͡ʹͳ Δ ී௨ʹॻ͘ͱωετͨ͠ΦϒδΣΫτͷঢ়ଶૢ࡞େม ωετͨ͠ΦϒδΣΫτ
ɿ*NNFSΛ༻ͨ͠Πϛϡʔλϒϧͳঢ়ଶૢ࡞ ˔ DSFBUFؔʹ*NNFSϛυϧΣΞΛڬΈࠐ Ή͚ͩͰ͑Δ ˔ ࣗ࡞ͨ͠ϛυϧΣΞࠩ͠ࠐΉ͜ͱ͕Ͱ͖ ΔͨΊɺଞͷϥΠϒϥϦʹม͕͑ޮ͘ ˔ ؆ܿʹॻ͚Δ
˔ ࣮ࡍʹΠϛϡʔλϒϧͳߋ৽͕ߦΘΕΔ
ɿ4UPSFఆٛϑΝΠϧʹ4FMFDUPSΛूੵ • 4FMFDUPS4UPSFఆٛϑΝΠϧ ʹूੵ͠ɺίϯϙʔωϯτଆͰ ͦΕΛݺͿ͚ͩʹ͢Δ • Ծʹ4UPSFͷ࣮ঢ়ଶཧϥΠ ϒϥϦΛมߋ͢Δ͜ͱʹͳͬͨͱ ͯ͠ɺݺͼग़͠αΠυͰͷ٧Ί
ସ͑ϩδοΫ͕࠷ݶͰࡁΉ
ɿঢ়ଶͷఆٛͱߋ৽Ҏ֎ͷॲཧͳΔ͘ॻ͔ͳ͍ ݱࡏͷ4UBUFΛऔಘͯ͠ܭࢉ Λߦ͏"DUJPO
ɿঢ়ଶͷఆٛͱऔಘɾߋ৽Ҏ֎ͷॲཧͳΔ͘ॻ͔ͳ͍ • ϏδωεϩδοΫؔʹΓग़ ͢ • ूੵ͢ΔؔͰϑΝΠϧ͕ංେԽ ͍ͨ͢͠Ίɺ4UPSFϑΝΠϧͷ Λ੍ݶ
༨ஊɿ4MJDFT1BUUFSO • ؔ৺͝ͱʹ4UBUFͱ"DUJPOͷΈ Λ4MJDFͱׂͯ͢͠Δ • 4MJDFಠཱͨؔ͠ͱͯ͠ఆٛ • 4MJDFΛΈ߹ΘͤͯετΞΛ࡞ ͢Δ
༨ஊɿ3FEVYMJLFQBUUFSOT • ΠϕϯτʹΑͬͯঢ়ଶͷߋ৽ॲ ཧΛग़͚͠ΔSFEVDFSΛ࡞ • EJTQBUDIͱ͍͏"DUJPOΛఆٛ • ݺͼग़͠ଆͰEJTQBUDIʹΠ ϕϯτͷใΛ͢
ಋೖͯ͠Έͯخ͍͠ͱ͜Ζɺඍົͳͱ͜Ζ
خ͍͠ͱ͜Ζ • 1SPWJEFSແ͠ͰطଘͷίʔυʹಋೖͰ͖ΔͨΊɺطଘίʔυςε τͷมߋ͕࠷খݶͰɺ)PPLͷςετ༰қʹͰ͖Δ • ঢ়ଶཧʹඞཁͳॲཧΛҰׅͰએݴͰ͖Δ ◦ Γͦ͏ͱࢥͬͨ࣌ʹΓͤΔ ◦
FTMJOUQMVHJOTUSJDUEFQFOEFODJFTͱΈ߹Θͤͯɺ JNQPSUͰ͖ΔϞδϡʔϧͷ੍ݶͳͲ؆୯ • ϛυϧΣΞͰػೳΛ֦ுͰ͖Δ ◦ ґଘϥΠϒϥϦΛ͑ΔɾίϯτϩʔϧͰ͖Δ
ඍົͳͱ͜Ζɿܕਪ • ͦͷ··ར༻͢Δͱ5ZQF4DSJQUͷܕఆٛΛશͯॻ͘ඞཁ͕͋Δ
༨ஊɿܕਪΛޮ͔ͤΔํ๏͋Γ·͢ • DPNCJOFϛυϧΣΞΛ༻͢Δ ◦ ଞͷϛυϧΣΞͱͷซ༻͕͍͠ ◦ ಛఆͷ߹ʹܕ҆શͰͳ͍<> • [VTUBOETMJDFT
[VTUBOEWBMUJP [VTUBOEYTͳͲͷϥΠϒϥϦΛ ซ༻͢Δ ◦ ॻ͖৺͕มΘΔ͜ͱͱɺґଘΛۃྗݮΒ͍ͨ͜͠ͱ͔Β༻͠ ͍ͯͳ͍ ◦ ؤுͬͯॻ͍ͨΒྑ͍Ͱ͋ΔͷͰɺɺ <>IUUQT[VTUBOEEPDTQNOESTHVJEFTUZQFTDSJQUUZQFTDSJQUHVJEF
• 4UBUFͱ"DUJPOΛͭͷΦϒδΣΫτͱͯ͠એݴ͢ΔͨΊɺܕΤϥʔ ͕4UPSFશମʹٴͿ͜ͱ͕͋Δ • 4UPSFϑΝΠϧ͕େ͖͘ͳΔͱݪҼͷಛఆ͕ࠔʹͳΓ͍͢ ◦ ࠓճͷཁ݅Ͱ4UPSFͷׂ͕͘͠ڐ༰͢Δ͔͠ͳ͍ ඍົͳͱ͜ΖɿܕΤϥʔ
;VTUBOEWͷظ
Wͷظ • ಛʹػೳ͕૿͑ΔΘ͚Ͱͳ͍ʢ#SFBLJOH͕͋Δʣ ◦ FTɺ3FBDUҎલͷαϙʔτΛΊΔͳͲ • όϯυϧαΠζ͕খ͘͞ͳΔ ◦ ݹ͍ػೳΛͬͯεϦϜԽ ◦
LCˠLC΄ͲʢNJOJGJFEʣ ◦ *NNFSΛซ༻͢ΔؔͰαΠζ͕ Ћ͞ΕΔͨΊຊମ͕খ͍͞ͱ خ͍͠ IUUQTHJUIVCDPNQNOEST[VTUBOESFMFBTFTUBHWSD
·ͱΊ
·ͱΊ • 4UPSFͷׂ͕͘͠τοϓμϯͷΞϓϩʔν͕దͨ͠ͷͰ ;VTUBOEΛબΜͩ • ঢ়ଶཧʹඞཁͳॲཧΛҰׅͰએݴͰ͖Δ • جຊDSFBUF͚ؔͩͳͷͰɺ͍ΖΜͳύλʔϯͰཁ݅ʹ߹Θ ͍ͤͨํ͕Ͱ͖Δ
• 5ZQF4DSJQUͰ͏߹͕ඞཁ͔ • དྷΔWͰ͞Βʹܰྔʹͳͬͯخ͍͠