Write better Vue and Nuxt code.

A highly curated collection of practical tips, advanced patterns, and performance tweaks for Vue & Nuxt.

useTip.ts
const { tip } = useAsyncData(
  'awesome-trick',
  () => queryContent().findOne()
)

Popular Topics
vue
nuxt
vite

In Nuxt Content, you can easily generate links to the previous and next articles.

<script setup lang="ts">
const route = useRoute();

const [prev, next] = await queryContent()
    .only(['_path', 'title'])
    .sort({ date: -1 })
    .findSurround(route.path);
</script>

<template>
<NuxtLink v-if="prev" :to="prev._path">
    <span>previous</span>
</NuxtLink>
</template>