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
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
880
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
930
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
CSC509 Lecture 11
javiergs
PRO
0
180
EMになってからチームの成果を最大化するために取り組んだこと/ Maximize team performance as EM
nashiusagi
0
100
よくできたテンプレート言語として TypeScript + JSX を利用する試み / Using TypeScript + JSX outside of Web Frontend #TSKaigiKansai
izumin5210
6
1.7k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
120
Contemporary Test Cases
maaretp
0
140
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
8
540
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
Remix on Hono on Cloudflare Workers
yusukebe
1
290
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
300
Featured
See All Featured
Side Projects
sachag
452
42k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
What's new in Ruby 2.0
geeforr
343
31k
Code Review Best Practice
trishagee
64
17k
Building Adaptive Systems
keathley
38
2.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
Designing the Hi-DPI Web
ddemaree
280
34k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Optimizing for Happiness
mojombo
376
70k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Statistics for Hackers
jakevdp
796
220k
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Ͱ͞Βʹܰྔʹͳͬͯخ͍͠