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
Vue.js + TypeScript + Firebase
Search
nunulk
January 19, 2019
Technology
0
960
Vue.js + TypeScript + Firebase
nunulk
January 19, 2019
Tweet
Share
More Decks by nunulk
See All by nunulk
Laravelでテストしやすいコードを書く5 / 5 tips of building testable modules in Laravel
nunulk
0
330
Design It! in a nutshell
nunulk
1
280
PHP Getting Faster
nunulk
0
280
How does learning English broaden your world?
nunulk
0
380
Testing on Laravel
nunulk
1
1.5k
Nuxt.js in TypeScript
nunulk
1
450
A startup meets Laravel + Vue.js
nunulk
1
2.1k
Unit Testing Laravel
nunulk
0
500
A Third-rate Programmer Talked about a Survival Strategy for Software Engineers
nunulk
3
590
Other Decks in Technology
See All in Technology
AWSの資格って役に立つの?
tk3fftk
2
340
バクラク最古参プロダクトで重ねた技術投資を振り返る
ypresto
0
130
マルチアカウント環境でSecurity Hubの運用!導入の苦労とポイント / JAWS DAYS 2026
genda
0
740
ガバメントクラウドにおけるAWSの長期継続割引について
takeda_h
2
300
進化するBits AI SREと私と組織
nulabinc
PRO
0
190
Everything Claude Code を眺める
oikon48
8
5.2k
内製AIチャットボットで学んだDatadog LLM Observability活用術
mkdev10
0
120
最強のAIエージェントを諦めたら品質が上がった話 / how quality improved after giving up on the strongest AI agent
kt2mikan
0
190
Zeal of the Convert: Taming Shai-Hulud with AI
ramimac
0
110
モブプログラミング再入門 ー 基本から見直す、AI時代のチーム開発の選択肢 ー / A Re-introduction of Mob Programming
takaking22
5
1.6k
[JAWSDAYS2026][D8]その起票、愛が足りてますか?AWSサポートを味方につける、技術的「ラブレター」の書き方
hirosys_
3
190
プラットフォームエンジニアリングはAI時代の開発者をどう救うのか
jacopen
6
3.5k
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
260
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
480
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
Faster Mobile Websites
deanohume
310
31k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
140
jQuery: Nuts, Bolts and Bling
dougneiner
65
8.4k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
220
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Git: the NoSQL Database
bkeepers
PRO
432
66k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Transcript
Vue.js + Firebase + TypeScript Ͱ ϦΞϧλΠϜνϟοτ nunulk #ReBuildCamp
Firebase • Google ͕ఏڙ͢Δ mBaaS • Cloud Firestore (Beta), Cloud
Storage, Cloud Functions, A/B Testing, Cloud Messaging
ٕͬͨज़ • Vue.js: 2.5.22 • TypeScript: 3.2.4 • Firebase: 0.3.7
• Element: 2.4.11
ೝূ͕ඞཁͳύεͷࢦఆ routes: [ { path: '/', name: 'home', component: Home,
meta: { requiresAuth: true } },
ϛυϧΣΞ router.beforeEach((to, from, next) => { const requiresAuth = to.matched.some(record
=> record.meta.requiresAuth) if (!requiresAuth) { next() } else { firebase.auth().onAuthStateChanged(function (user) { if (user) { next() } else { next({ path: '/signin', query: { redirect: to.fullPath } })
Component export default class ChatBoard extends Vue { user: User
= { id: null, email: '', avatar_image_url: '' } participants: User[] = [] messages: Message[] = [] message: Message = { room_id, sender_id: null, content: ‘', created_at: null, }
Component created(): void { const fireUser = firebase.auth().currentUser; if (!fireUser)
{ return; } this.user.id = fireUser.uid; this.user.email = fireUser.email; db.collection('users').doc(this.user.id).get() .then((doc) => {})
Component db.collection('messages') .onSnapshot((snapshot) => { const changes = snapshot.docChanges() if
(!changes) { return } changes.forEach((change) => { if (change.type === 'added') { const message = { room_id: change.doc.data().room_id, sender_id: change.doc.data().sender_id, content: change.doc.data().content, created_at: this.timestamp2String(change.doc.data().created_at) }; this.addMessageData(message); }
σϞ