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
320
Design It! in a nutshell
nunulk
1
270
PHP Getting Faster
nunulk
0
280
How does learning English broaden your world?
nunulk
0
370
Testing on Laravel
nunulk
1
1.5k
Nuxt.js in TypeScript
nunulk
1
440
A startup meets Laravel + Vue.js
nunulk
1
2k
Unit Testing Laravel
nunulk
0
490
A Third-rate Programmer Talked about a Survival Strategy for Software Engineers
nunulk
3
590
Other Decks in Technology
See All in Technology
SMTP完全に理解した ✉️
yamatai1212
0
160
IaaS/SaaS管理における SREの実践 - SRE Kaigi 2026
bbqallstars
3
1k
Amazon ElastiCacheのコスト最適化を考える/Elasticache Cost Optimization
quiver
0
350
AWS Devops Agent ~ 自動調査とSlack統合をやってみた! ~
kubomasataka
2
290
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
3
2.1k
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
120
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
110
新規事業における「一部だけどコア」な AI精度改善の優先順位づけ
zerebom
0
450
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
170
Claude Codeベストプラクティスまとめ
minorun365
57
32k
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
2.9k
Bill One 開発エンジニア 紹介資料
sansan33
PRO
4
17k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.6k
Site-Speed That Sticks
csswizardry
13
1k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
0
2.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
170
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
0
1.8k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
How to Ace a Technical Interview
jacobian
281
24k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
2.9k
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); }
σϞ