Uploaded February 2024 | Updated November 2026, 8 hours ago
The defineProps in Vue can be used in a few ways using TypeScript. In this video I discuss 2 different ways of using props and what I think is best using Zod.
๐ Check out my last video on Styling with Tailwind
youtu.be/rs6Vmkz93EQ?si=whVnXtkXv25PQhss
๐Sign up for my mailing list and get neat stuff!
bit.ly/3Umk7sW
๐ Need some help with a project, level up your skills, React, Next, Vue, or Nuxt? Check out my 1-on-1 mentoring!
mentors.to/erik
Links:
https://zod.dev/?id=installation
blog.vuejs.org/posts/vue-3-3#reactive-props-destructure
0:00 defineProps problem
0:36 inherit props explained and $attrs
02:00 using defineProps
03:30 adding validations
04:25 using defineProps with TS
06:23 adding in default values with destructuring
08:10 adding in validation with Zod
The defineProps in Vue can be used in a few ways using TypeScript. In this video I discuss 2 different ways of using props and what I think is best using Zod.
๐ Check out my last video on Styling with Tailwind
youtu.be/rs6Vmkz93EQ?si=whVnXtkXv25PQhss
๐Sign up for my mailing list and get neat stuff!
bit.ly/3Umk7sW
๐ Need some help with a project, level up your skills, React, Next, Vue, or Nuxt? Check out my 1-on-1 mentoring!
mentors.to/erik
Links:
https://zod.dev/?id=installation
blog.vuejs.org/posts/vue-3-3#reactive-props-destructure
0:00 defineProps problem
0:36 inherit props explained and $attrs
02:00 using defineProps
03:30 adding validations
04:25 using defineProps with TS
06:23 adding in default values with destructuring
08:10 adding in validation with Zod










