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
How to define the relationship in vuex's state
Search
Tetsuya Tatsumi
March 09, 2018
Programming
1
420
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
78
筋トレ応援団.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
Stackless и stackful? Корутины и асинхронность в Go
lamodatech
0
950
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
450
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
range over funcの使い道と非同期N+1リゾルバーの夢 / about a range over func
mackee
0
110
Spatial Rendering for Apple Vision Pro
warrenm
0
150
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
2
430
快速入門可觀測性
blueswen
0
410
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
340
なまけものオバケたち -PHP 8.4 に入った新機能の紹介-
tanakahisateru
1
130
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
350
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
530
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
200
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Site-Speed That Sticks
csswizardry
2
190
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Speed Design
sergeychernyshev
25
670
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
GitHub's CSS Performance
jonrohan
1031
460k
Bash Introduction
62gerente
609
210k
KATA
mclloyd
29
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
1
110
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