$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
vuexとvue-routerとあれこれ
Search
Tajima Sachiko
December 24, 2019
Programming
0
1.5k
vuexとvue-routerとあれこれ
#aizu_fun_lt の資料です。
Tajima Sachiko
December 24, 2019
Tweet
Share
More Decks by Tajima Sachiko
See All by Tajima Sachiko
デザインシステムで アクセシビリティ品質が 担保できなかった 「3つの理由」
schktjm
0
64
エラーとアクセシビリティ
schktjm
1
1.6k
コンポーネントライブラリで実現する、アクセシビリティの正しい実装パターン
schktjm
3
1.3k
ゼロから始めるアクセシビリティ啓蒙活動
schktjm
2
3k
CLUB p1ass を作った
schktjm
0
250
はじめての npm パッケージ作り
schktjm
0
300
E2E テスト入門
schktjm
0
490
Firebaseでお手軽OGP生成
schktjm
0
620
3時間でつくるいいかんじのポートフォリオサイト
schktjm
1
390
Other Decks in Programming
See All in Programming
エディターってAIで操作できるんだぜ
kis9a
0
740
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
150
脳の「省エネモード」をデバッグする ~System 1(直感)と System 2(論理)の切り替え~
panda728
PRO
0
110
チームをチームにするEM
hitode909
0
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
210
【Streamlit x Snowflake】データ基盤からアプリ開発・AI活用まで、すべてをSnowflake内で実現
ayumu_yamaguchi
1
120
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
130
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
160
認証・認可の基本を学ぼう前編
kouyuume
0
260
AIコーディングエージェント(Manus)
kondai24
0
200
Go コードベースの構成と AI コンテキスト定義
andpad
0
130
Featured
See All Featured
エンジニアに許された特別な時間の終わり
watany
105
220k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
57
37k
The SEO identity crisis: Don't let AI make you average
varn
0
32
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
75
Game over? The fight for quality and originality in the time of robots
wayneb77
1
61
Rebuilding a faster, lazier Slack
samanthasiow
85
9.3k
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
370
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
75
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.7k
Utilizing Notion as your number one productivity tool
mfonobong
2
180
Transcript
vuexとvue-router とあれこれ たじま ( @schktjm #aizu_fun_lt
メリークリスマス
今日言うこと - 自己紹介 - リロードの挙動とvuex - vuexのactionのエラーハンドリングの話 - 問題点 -
vue routerはすごい
自己紹介 - 田嶋幸智子 ( @schktjm - やってること - フロントエンド: Vue,
React, TS - 競プロ: 緑 - 好きなこと - スノボー - バイク
そもそも セッショントークンが切れている場合、読み込み時にAPIが401を返しなにも 見えないエラーが発生
そこで とりあえず、セッショントークンなど切れている場合ログイン画面に飛ばしたい。
App.vueのcreatedで トークンが無効 ↓ /login に飛ばす をするとエラーがconsoleに出力 されてしまう 改善案1
問題(再生できなかったらデモ
改善案2 vue-routerのナビゲーショ ンガード: 遷移時点( 画面が読み込ま れる前 ) でトークンが有効 かどうかを判定しログイン 画面に飛ばす。
実際のコード router/index.js
成功例 ( 再生でk(ry
そもそもの問題が 「リロード時にvuexのstoreの値が初期化されてしまう」から 始まった問題ですがvue-routerを深く理解できてよかったです
ありがとうございました!