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
510
状態管理ライブラリZustandの導入から運用まで
daiki
September 06, 2024
Tweet
Share
Other Decks in Programming
See All in Programming
Golang と Erlang
taiyow
8
1.9k
macOS でできる リアルタイム動画像処理
biacco42
6
1.7k
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
480
/←このスケジュール表に立ち向かう フロントエンド開発戦略 / A front-end development strategy to tackle a single-slash schedule.
nrslib
1
590
Importmapを使ったJavaScriptの 読み込みとブラウザアドオンの影響
swamp09
4
1.2k
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.7k
Kubernetes for Data Engineers: Building Scalable, Reliable Data Pipelines
sucitw
1
200
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
420
推し活としてのrails new/oshikatsu_ha_iizo
sakahukamaki
3
1.6k
hotwire_or_react
harunatsujita
8
4k
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
130
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
13
1.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.1k
Being A Developer After 40
akosma
86
590k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
41
2.1k
Unsuck your backbone
ammeep
668
57k
A better future with KSS
kneath
238
17k
Mobile First: as difficult as doing things right
swwweet
222
8.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
A Modern Web Designer's Workflow
chriscoyier
692
190k
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Ͱ͞Βʹܰྔʹͳͬͯخ͍͠