Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Vuexについて
Search
sinpey_g2
October 19, 2017
Technology
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vuexについて
Vuexについて社内LTで発表したときの資料です
sinpey_g2
October 19, 2017
Other Decks in Technology
See All in Technology
地方移住と都心キャリアの両立は「金・時間・人」のリソースをフル活用すれば実現できる!〜Snowflake女子会 vol.8
snowwmn0824
0
110
リアーキテクチャ後の障害ゼロを目指したShadow Testingの取り組み
nihonbuson
PRO
1
180
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
4
2.1k
Oracle Cloud Network Path Analyzerを試してみた/I Tried Out Oracle Cloud Network Path Analyzer
masakiokuda
1
110
ボードゲームの遊び相手をFoundation Modelsで作る / iOSDC Japan 2026
genda
0
160
作って終わりじゃないサーバーレス 〜9年運用する大規模EC物流API基盤の設計・運用のリアル〜
zozotech
PRO
0
510
負債のメタファと2026年 / Debt Metaphor in Agentic Engineering Age 202609 Edition
twada
PRO
11
6.7k
2026-09-08 そのJavaモダナイゼーション、AIに丸投げで大丈夫?IBM Bobで変わる品質と効率
yutanonaka
1
180
人にやさしく、AIにやさしく、書き手を選ばないIaCのガードレール再考 / Rethinking IaC Guardrails for Humans and AI Alike
kohbis
5
840
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.7k
【ゲームメーカーズスクランブル2026】『Shadowverse: Worlds Beyond』UIとアニメーションで実現する最高のユーザー体験を叶えるプロトタイピング
cygames
PRO
0
340
AgentCore Runtime上にAgentic Coding基盤を構築・展開する際の設計ポイントと限界点 / Design considerations and limitations when building an agentic coding platform on AgentCore Runtime
har1101
6
740
Featured
See All Featured
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
How to train your dragon (web standard)
notwaldorf
97
6.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
430
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
540
Done Done
chrislema
187
17k
Optimizing for Happiness
mojombo
378
71k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
The agentic SEO stack - context over prompts
schlessera
0
940
Navigating Team Friction
lara
192
16k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
730
Transcript
Vuexʹ͍ͭͯ !TJOQFZ@H
Vuex ͱ
ग़యIUUQTWVFYWVFKTPSHKBJOUSPIUNM
Vue.jsͷͭΒ͍ͱ͜ΖΛ ղܾͯ͘͠ΕΔͷ ग़యIUUQTWVFYWVFKTPSHKBJOUSPIUNM
Vue.js ͷͭΒ͍ͱ͜Ζ
Vue.jsͷσʔλϑϩʔ ग़యIUUQTWVFYWVFKTPSHKBJOUSPIUNM
Vue.jsͷσʔλϑϩʔ ୯ҰίϯϙʔωϯτͰ͔͠௨༻͠ͳ͍ ग़యIUUQTWVFYWVFKTPSHKBJOUSPIUNM
Vue.jsͷͭΒ͍ͱ͜Ζ ίϯϙʔωϯτؒͰ ঢ়ଶͷڞ༗͕໘
Vue.jsͷͭΒ͍ͱ͜Ζ ࢠ ଙ isUpdated role index props : [
role, isUpdated ] props : [ role ] props : [ role, index, isUpdated ] props : [ role, index, isUpdated ] props : [ isUpdated ] props : [ isUpdated ] ˡΤϥʔ
Vue.jsͷͭΒ͍ͱ͜Ζ wίϯϙʔωϯτ͔Βঢ়ଶͷड͚͠ wଞίϯϙʔωϯτͰঢ়ଶΛڞ༗ ଙɺͻଙ͕૿͑ΔͱQSPQTࠈʹͳΔ ίϯϙʔωϯτͷঢ়ଶมԽΛͰXBUDIͯ͠ৗʹಉظ ͭΒ͗͢Δ
VuexΛ͏ͱ…!
VuexΛ͑͜͏ॻ͚Δ ɾશͯͷίϯϙʔωϯτʹରͯ͠ ɹঢ়ଶΛཧɺڞ༗Ͱ͖Δ ɾࢠؒͰ༨ܭͳঢ়ଶͷ ɹड͚͠Λ͠ͳͯ͘Α͘ͳΔʋ(*´∇ʆ)ů
Vue.jsͷσʔλϑϩʔ ग़యIUUQTWVFYWVFKTPSHKBJOUSPIUNM
Vuexͷσʔλϑϩʔ 'MVY 3FEVY͔ΒͷӨڹΛड͚͍ͯΔ ίϯϙʔωϯτͷ ·ͱ·Γ ग़యIUUQTWVFYWVFKTPSHKBJOUSPIUNM
Vuex جຊతͳ͍ํ
Vuex ͍ํ const store = new Vuex.Store({ state: { },
mutations: { }, actions: { } }) // State // Mutation // Action
Vuex ͍ํ State State VuexͷجຊͰ͋Γ࠷େͳཁૉ = ঢ়ଶ
state: { form: { article: { title: '', ogp_title: '',
description: '', keywords: '', main_image: '', }, writers: [], blocks: [], status: Number, should_update: Boolean }, role: String, errors: [], }, Vuex ͍ํ State
Vuex ༻ྫ Mutation Mutation StateΛมߋ͢Δ = ঢ়ଶΛมԽͤ͞Δ MutationҎ֎͕ StateΛมߋ͢Δ͜ͱͰ͖ͳ͍
mutations: { readRole (state, role) { state.role = role },
}, this.$store.commit(‘readRole', ‘staff’) Vuex ༻ྫ Mutation Mutarionͷએݴ ίϯϙʔωϯτͰMutationΛ͏
Vuex ༻ྫ Action Action ඇಉظॲཧΛߦ͏ MutationΛݺͿ StateΛมߋ͢Δ͜ͱͰ͖ͳ͍
Vuex ༻ྫ Action Action MutationͰඇಉظॲཧΛߦΘͳ͍ ඇಉظॲཧ͕ແ͍߹ActionΛ հ͞ͳͯ͘ྑ͍
actions: { saveRole: function(context) { axios.post().then( context.commit(‘saveRole’)) } } methods:
{ saveRole() { this.$store.dispatch('saveRole') } } Vuex ༻ྫ Action Actionͷએݴ ίϯϙʔωϯτ͔ΒActionͷ࣮ߦ
·ͱΊ w7VFYͱ wෳίϯϙʔωϯτͰঢ়ଶͷڞ༗Λศརʹ͢Δͷ wجຊతͳ͍ํ w4UBUF wঢ়ଶΛอ࣋ w.VUBUJPO wঢ়ଶΛมߋ͢Δ w"DUJPO wඇಉظॲཧΛߦ͏
ࢀߟ wެࣜυΩϡϝϯτ IUUQTWVFYWVFKTPSHKB w7VFKTͷίϯϙʔωϯτͱࢠؒσʔλͷૹड৴ ɹ IUUQDIJCJOPXBOFUOPUFWVFKTWVFIUNM