Mastering Nuxt (@MasteringNuxt) header
Mastering Nuxt (@MasteringNuxt) profile picture

Learn how to develop and deploy fast, production-ready Nuxt apps. Courses developed in collaboration with @Nuxt_js Powered by @Bitter_Brains

Joined September 2020
Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)Photo by Mastering Nuxt (@MasteringNuxt)
💡Nuxt Tip Are heavy libraries killing your bundle size? Then load them on demand! Wrap them in a composable with dynamic imports and only download them when the user actually needs them.
1
15
940
Nuxt gives you a fast foundation, but there’s plenty you can do to make your apps even faster. This guide from @CertificatesDev covers practical performance tips in @nuxt_js, including routeRules, bundle analysis, caching, font loading, and more 👇 certificates.dev/blog/perfor…
2
9
645
Tired of choosing between SSR or SSG for your entire app? @nuxt_js 4 lets you mix strategies per route. Static pages for marketing, ISR for blogs, and client-side for admin dashboards.
1
1
1
18
794
💡 Nuxt Tip @nuxt_js 4's cachedEventHandler is a fantastic feature. All you do is wrap your API routes to cache responses!
1
1
6
603
SEO in @nuxt_js is more than meta tags. 🚀 This guide from @CertificatesDev shows you how to set up `@nuxtjs/seo` with sitemaps, robots.txt, structured data, OG images, `useSeoMeta`, and more. Read the guide 👇 certificates.dev/blog/seo-in…
1
1
16
686
The stale-while-revalidate pattern: Serve fast, update in background. Users get instant responses (even if slightly stale) and the cache rebuilds in the background. Here's how you can do this in @nuxt_js / Nitro.
1
1
12
1,346
Deploying a @nuxt_js app? Nitro makes it possible to deploy almost anywhere, but choosing between SSR, SSG, ISR, and hybrid rendering can get confusing. This guide from @CertificatesDev breaks it all down 👇 certificates.dev/blog/deploy…
1
11
854
.@nuxt_js allows you to set the `dedupe` parameter to `'defer'` in `useFetch`, which will keep the pending request and not initiate a new one if another request is triggered while the previous one is still pending. This is useful for avoiding unnecessary duplicate requests.
1
1
9
497
If you need the raw string value of the request body in @nuxt_js, use the readRawBody method from h3. Specify the encoding (like 'utf-8') to get the body as a string.
1
1
9
519
State management in @nuxt_js apps usually starts simple… until SSR, testing, and devtools start hurting. This guide from @CertificatesDev breaks down when @vuejs reactivity is enough and when Pinia actually earns its place 👇 certificates.dev/blog/state-…
1
1
6
448
With @nuxt_js, you can retrieve the request body as a Buffer object using readRawBody from h3. Pass false as the second argument to get the raw buffer data.
3
1
18
1,113
In @nuxt_js 4.2, you can pass in your own AbortController when data fetching if you need fine-grained control over when requests are canceled:
1
16
1,185
Composables are where most @nuxt_js apps quietly get messy. SSR state, duplicated logic, hydration bugs… it adds up fast. This guide from @CertificatesDev breaks down what actually works in production Nuxt apps 👇 certificates.dev/blog/compos…
10
561
Nuxt Tip 💡 It’s really easy to customize how our Markdown is rendered in @nuxt_js Content by writing custom prose components. If we wanted to add a `filename` to the code block component, we’d copy over `ProsePre` and update it a little:
1
6
492
In @nuxt_js you can return an error directly from the `validate` function in `definePageMeta` if something is wrong with the route parameters. This is helpful for showing custom error messages, such as when a chapter does not exist in a course.
1
10
427
When writing unit tests, @nuxt_js provides the `mountSuspended` helper, which allows you to mount any component within your Nuxt context, even if it uses async setup. This makes it easy to test components that rely on asynchronous data or lifecycle hooks.
1
1
12
602
In @nuxt_js, you might need to display debug info or tools like a DevAccountSwitcher component that should only be visible during development. To do this, wrap your component with a `<DevOnly>` tag in your layout file. This component will be excluded from your production build.
2
1
14
525
In @nuxt_js you can use the `onNuxtReady` composable to load heavy resources or execute code on the client side without blocking the main thread. It waits for Nuxt to finish hydrating and then schedules your task using `requestIdleCallback`, so it runs when the browser is idle.
1
1
9
465
If there’s an error with rendering your server component in @nuxt_js, there’s a #fallback slot that will be rendered on the client-side:
1
5
516
With @nuxt_js, when you set `keepalive: true` in the `definePageMeta` of a child page, its state will be preserved even when navigating between sibling pages. This ensures that switching between child routes does not reset their state, no matter the parent or NuxtPage config.
1
1
19
946