Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
How to define the relationship in vuex's state
Search
Tetsuya Tatsumi
March 09, 2018
Programming
1
410
How to define the relationship in vuex's state
When you use vuex state, how to define relationship between state objects?
Tetsuya Tatsumi
March 09, 2018
Tweet
Share
More Decks by Tetsuya Tatsumi
See All by Tetsuya Tatsumi
LINE Thingsで視力検査
dokechin
0
76
筋トレ応援団.pdf
dokechin
1
260
全文検索システムFESSを使った Web+DB PRESS 総集編の全文検索
dokechin
0
310
ダンドリーキッチン
dokechin
0
390
ダンドリーキッチン
dokechin
0
1.1k
Other Decks in Programming
See All in Programming
Discord Bot with AI -for English learners-
xin9le
1
110
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
650
[Do iOS '24] Ship your app on a Friday...and enjoy your weekend!
polpielladev
0
230
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
630
Djangoの開発環境で工夫したこと - pre-commit / DevContainer
hiroki_yod
1
620
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
130
Java 23の概要とJava Web Frameworkの現状 / Java 23 and Java web framework
kishida
2
370
As an Engineers, let's build the CRM system via LINE Official Account 2.0
clonn
1
630
Welcome JSConf.jp 2024
yosuke_furukawa
PRO
0
3k
Full stack testing :: basic to basic
up1
1
860
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
350
PaaSとSaaSの境目で信頼性と開発速度を両立する 〜TROCCO®︎のこれまでとこれから〜
gtnao
6
6.1k
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Side Projects
sachag
452
42k
Ruby is Unlike a Banana
tanoku
97
11k
The Invisible Side of Design
smashingmag
298
50k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Bash Introduction
62gerente
608
210k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Teambox: Starting and Learning
jrom
133
8.8k
Designing for humans not robots
tammielis
250
25k
A Tale of Four Properties
chriscoyier
157
23k
Transcript
)PXUPEFpOFUIF SFMBUJPOTIJQJOWVFYT TUBUF (PUBOEBKTJO/FYUCFBU !EPLFDIJO
ˏEPLFDIJO w .JEEMF"HFENBOXIPMJLFTUPNBLFXFC BQQMJDBUJPO CVUUFDIOPMPHZMFWFMJTʜ
*NQMFNFOUJOH8FC "QQMJDBUJPOGPSQFSTPOBMVTF w 7VF w 7VFY w WVFDMJ w 7VFUJGZ
7VFY It serves as a centralized store for all the
components in an application
.PEFM ΠΦϯ ͓٬༷ײँσʔ ͋Γ͕ͱ͏σʔ ΠτʔϤʔΧಊ ϋοϐʔσʔ
%FpOFSFMBUJPOTIJQCZ SFGFSFODF TUBUF\ TIPQT<BFPO ZPLBEP> EJTDPVOUT< \OBNFb͓٬༷ײँσʔ` TIPQBFPO^
\OBNFb͋Γ͕ͱ͏σʔ` TIPQBFPO^ \OBNFbϋοϐʔσʔ` TIPQZPLBEP^ > ^
%FpOFSFMBUJPOTIJQCZ*% TUBUF\ TIPQT<\JE OBNFbΠΦϯ`^ \JE OBNFbϤʔΧಊ`^> EJTDPVOUT< \OBNFb͓٬༷ײँσʔ`
TIPQ@JE^ \OBNFb͋Γ͕ͱ͏σʔ` TIPQ@JE^ \OBNFbϋοϐʔσʔ` TIPQ@JE^ > ^
(FUUJOHTIPQOBNFGSPN EJTDPVOU w EJTDPVOUTIPQOBNF w HFU4IPQ#Z*E EJTDPVOUTIPQ@JE OBNF 3FGFSFODFɹ *%ɹ
3FGFSFODFXBZ w 6OEFSTUBOEBCMFDPEF w /PHFUUFSSFRVJSFE
4UBUFQFSTJTUFODF QSPCMFN
6TJOH-PDBM4UPSFHF BTTUBUFTUPSF
3FGFSFODFPCKFDUJT SFQMBDFEUPWBMVF TUBUF\ TIPQT<\OBNFbBFPO`^ \OBNFbZPLBEP`^> EJTDPVOUT< \OBNFb͓٬༷ײँσʔ` TIPQ\OBNFbBFPO`^^
\OBNFb͋Γ͕ͱ͏σʔ` TIPQ\OBNFbBFPO`^^ \OBNFbϋοϐʔσʔ` TIPQ\OBNFbZPLBEP`^^ > ^
3FGFSFODFSFDPOTUSVDUJT OFFEFE var storage = JSON.parse localStorage.getItem bkey' var shops
= new Map storage.shops.map i => <i.id i> for var discount of storage.discounts { discount.shop = shops.get discount.shop.id } this.replaceState Object.assign state storage
$PODMVTJPO w 3FMBUJPOTIJQTPGNFNCFSTPG4UBUFDBOCF SFQSFTFOUFEVTJOHSFGFSFODFT w #VUDPOTJEFSBUJPOGPSQFSTJTUFODFTUPSFJT OFDFTTBSZ