A Better Way To Create Vue Components With Props Using TypeScript

Veröffentlicht am: 20 Februar 2024
auf dem Kanal: Program With Erik
13,157
406

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
   • Style Your App With Tailwind CSS In 10 Min...  

👉Sign up for my mailing list and get neat stuff!
https://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!
https://mentors.to/erik

Links:
https://zod.dev/?id=installation
https://blog.vuejs.org/posts/vue-3-3#...

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


Auf dieser Seite können Sie das Online-Video A Better Way To Create Vue Components With Props Using TypeScript mit der Dauer online in guter Qualität ansehen, das der Benutzer Program With Erik 20 Februar 2024 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 13,157 Mal angesehen und es wurde von 406 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!