Teacher @ Vue School
Full Stack developer (10 years)
Husband and Father
https://vuejs.org/style-guide/
app-popup.vue
VS Code Extension
Let's take a look at a few examples
Typing Props & Events
Nuxt 3 Supports TypeScript by Default
Nuxt even generates some types on the fly
Nuxt 3 provides great community wide conventions
Nuxt 3 provides great community wide conventions
Inspired by Laravel
What it might look like in Nuxt
What it might look like in Nuxt
What it might look like in Nuxt
Could remove partials as routes in production
Can copy
this convention
or come up
with your own
// Http.js
import axios from 'axios'
export default class Http{
async get(url){
const response = await axios.get(url);
return response.data;
}
// ...
}
// Http.js
export default class Http{
async get(url){
const response = await fetch(url);
return await response.json();
}
// ...
}
export default class Http{
async get(url){
try {
const response = await fetch(url);
return await response.json();
} catch (err) {
alert(err);
}
}
// ...
}
// Http.js
import Cache from './Cache.js'
export default class Http{
async get(url){
const cached = Cache.get(url)
if(cached) return cached
const response = await fetch(url);
return await response.json();
}
// ...
}
// AppIcon.vue
<template>
<FontAwesomeIcon v-if="type==='fa'" :icon="icon" />
<md_icon v-if="type=== 'md'">{{icon}}</md_icon>
</template>
<script>
export default{
props:{
type: { type: String, default: 'fa' },
icon: { type: String, required: true }
}
}
</script>
axios('https://someapi.com/posts/1')
post.find(1)
post.find(1)
https://firebase.google.com/
https://vueschool.io/courses/the-vuejs-3-master-class
https://supabase.com/
https://supabase.com/
npx supabase gen types typescript --project-id "$PROJECT_ID" --schema public > types/supabase.ts
🔥 Course just completed!
from
April 3
February 2
March 15
🔥 Free
https://certification.vuejs.org/