dev-resources.site
for different kinds of informations.
Learning Vue
Three months ago, I switched jobs and transitioned from working on a React/Next.js frontend to a Vue 3 frontend.
While this isn't my first time using Vue 3, it is the first time I decided to properly learn it. So, I subscribed to @vueschool_io and started the Vue.js 3 Fundamentals with the Composition API course, thinking, "This is all standard stuff, and I already know everything."
But boy, was I wrong!
It only took two lectures to learn something so small and simple yet incredibly elegant:
<li v-for="{id, label} in items" :key="id">{{ label }}</li>
In all the time I wrote Vue I have never knew this and always went
for this approach:
<li v-for="item in items" :key="item.id">{{ item.label }}</li>
This small discovery showed me the value of taking the time to properly learn a framework. Sometimes, even the smallest tips can make a big difference.
What little coding tricks have surprised you? Share them below!
Featured ones: