Vue Code-Shaving: Shorthands to a Cleaner Template Block ~ Sybren Willemot
Check out this Vue.js Nation tip by Sybren Willemot, a Front-end developer and meet up co-organizer: Streamline your Vue templates with a few simple techniques. Vue offers shorthands for common directives, such as one for v-bind. When working with props, you can skip the `prop.` prefix and bind them directly by name. Better yet, since Vue v3.4 if a child component’s prop matches the variable name being passed, you can shave your code even more. These small changes keep your code clean, minimal, and easier to read. ____________________ 🔗 More Vue School: Bluesky: https://bsky.app/profile/vueschool.io Twitter: https://x.com/VueSchool_io LinkedIn: https://www.linkedin.com/company/vueschool Facebook: https://www.facebook.com/vueschool Instagram: https://www.instagram.com/vueschool Website: https://vueschool.io