Chapters
00:00 - Creating our component file
00:55 - Defining our FormInput props
02:40 - Using our prop values
04:37 - Using our FormInput component
06:00 - Doing some cleanup
Join Adocasts Plus for $8.00/mo, or sign into your account to get access to all of our lessons.
In this lesson, we'll create a reusable FormInput Vue Component using our current form field as a starting point.
Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.
Adocasts
Burlington, KY
00:00 - Creating our component file
00:55 - Defining our FormInput props
02:40 - Using our prop values
04:37 - Using our FormInput component
06:00 - Doing some cleanup
Join Adocasts Plus for $8.00/mo, or sign into your account to get access to all of our lessons.
Join The Discussion! (2 Comments)
Please sign in or sign up for free to join in on the dicussion.
gribbl
Hello. I believe that with recent versions of Vue, it is possible to handle things more easily.
The recommended approach to implement two-way binding on a component with
v-model
is to use thedefineModel()
macro.Prop destructuring is now supported and allows to declare default values.
Lastly, there is a shorthand for attribute bindings with same name.
Please sign in or sign up for free to reply
tomgobich
Hi gribbl! Thank you for sharing! Yeah, I had missed a number of Vue 3.4's enhancements. I apologize we didn't use any of them in this series. As for 3.5's enhancements, this codebase is still on 3.4 - I don't want to update any packages mid-series until we get to the end where we'll focus on Inertia v2's changes.
Please sign in or sign up for free to reply