Vue tips · 132 tips

Vue & Nuxt tips

Over the last few years, I've collected a list of valuable tips while developing and writing about Vue & Nuxt. Some are clever, some I use almost every day, and some are more advanced — but they're all useful.

Nuxt Tip: Render Component Only on Client-Side Image

Nuxt Tip: Render Component Only on Client-Side

By default, Nuxt uses universal (client-side + server-side) rendering to render your application. The ClientOnly component can be used torender its slot only in client-side.
Vue Tip: Validate Events and Prop Types Image

Vue Tip: Validate Events and Prop Types

You can validate prop types and events in Vue. If a requirement is not met, Vue will warn you in the browser's JavaScript console.
Nuxt Tip: Refresh Data by Watching Sources Using useAsyncData Image

Nuxt Tip: Refresh Data by Watching Sources Using useAsyncData

Nuxt 3's useAsyncData() composable can be used within your pages, components, and plugins to get access to data that resolves asynchronously. It can also be used to refresh the data loaded from the API based on the user's action. (pagination, filtering results, searching, etc.)
Vue Tip: When to Use Render Function Image

Vue Tip: When to Use Render Function

When should I use a render function in Vue.js? We’re going to cover some advanced Vue.js patterns when you need to use render functions.
Nuxt Tip: Rendering Modes Image

Nuxt Tip: Rendering Modes

Nuxt 3 provides plenty of options for rendering. There are SSG, SSR, Universal, SPA, ISG, or mix it up per route with hybrid rendering.
Vue Tip: Debugging in Templates Image

Vue Tip: Debugging in Templates

Guide to debug Vue component templates using the Browser DevTools.
Vue Tip: Use Scoped Slots in a Child Component to Provide Data for Parent Component Image

Vue Tip: Use Scoped Slots in a Child Component to Provide Data for Parent Component

A Scoped Slot in a child component can provide data for presentation in the parent component using a slot.
Nuxt Tip: Use DevTools to Know Your App Better Image

Nuxt Tip: Use DevTools to Know Your App Better

Nuxt DevTools is a set of visual tools that help you to know your app better.
Vue Tip: Re-Rendering Vue Routes When Path Parameters Change Image

Vue Tip: Re-Rendering Vue Routes When Path Parameters Change

In SPA that uses the Vue Router, it’s common to create a path parameter that changes the behavior of a route.
Vue Tip: Destructure Props in Composition API Without Losing Reactivity Image

Vue Tip: Destructure Props in Composition API Without Losing Reactivity

How to correctly destructure props object in a Vue component while maintaining the reactivity.