Nuxt 3 Is The Most Beautiful Thing Ever!
A little bit of background
I have been a Vue developer for a few years. Although I have worked with earlier versions (particularly Vue 2.x) and have experimented with Nuxt 2 a few times, I have been hesitant to use Nuxt 2 as my primary tool for Vue projects. There were just aspects of it I didn't like (my personal opinion), so I preferred sticking to native Vue unless I absolutely needed to use Nuxt.
But all of that changed with Vue 3 (which is amazingly awesome, by the way) and the stable release of Nuxt 3. I did a few practice projects with Nuxt 3 to really understand what had changed and see if I could have a reason to maybe change my mind. Well, Nuxt 3 is everything it claims to be, and I don't see myself building Vue apps any other way.
This short article highlights all the things I love about Nuxt 3 in no particular order and reinforces why I love working with Vue even more.
Disclaimer!
I may or may not mention features that have existed since Nuxt 2, so please forgive me, Nuxt Community, I was not familiar with your game.
What This Article Is
This article is all about geeking out over the things I love the most about Nuxt 3. It's a personal take on what makes Nuxt 3 amazing and why I’m excited about it.
What This Article Is Not
This article is not aimed at highlighting the overall best features of Nuxt 3, maybe I will cover that in a separate article.
Nuxi, you beautiful beauty!
Nuxt 3 introduces a powerful CLI that makes creating projects much easier. You can spin up projects from the ground up quicker or choose from a variety of available templates for a quick boilerplate depending on your use case. But wait, there's more! We don't just have the power to create new projects and boilerplates; we can easily add Nuxt Modules (which have gotten a facelift!) as well as create layouts, pages, components, plugins, and middleware, all from the CLI with relative ease and some initial boilerplate to get you up and running. This eliminates a lot of the manual work involved in setting up your project and saves a lot of time.
TypeScript, of course
We can all agree that TypeScript on its own is one of the best things to happen to web development in recent years. With its addition in Vue 3, it was only natural that it would find its way to Nuxt. But that's not all—I love the fact that TypeScript is the default in Nuxt 3. Switching from JavaScript to TypeScript within Nuxt is seamless, with zero configuration needed. Being able to leverage on all the great features of TypeScript within Nuxt just makes the experience so much better.
Vite! Vite!! Vite!!!
Nuxt 3 uses Vite by default, which, if you don't already know, just makes the experience so much better. Developed by Evan You, the creator of Vue, Vite is designed to address the limitations of traditional bundlers like Webpack, especially regarding development speed and build performance. So out of the box, we get all that comes with Vite within Nuxt with no additional configuration needed.
import { x } from... Nah, no need!
One notable addition to Vue 3 is the Composition API, which requires a lot of manual imports in native Vue 3 to fully utilize its features. However, Nuxt 3 simplifies this process significantly.
In Nuxt 3, you can use the Composition API's features—such as creating computed properties, reactive variables, refs, and composables—without needing to manually import them. Nuxt 3 includes next-gen auto imports, which automatically import commonly used APIs and components, reducing boilerplate code and making development smoother.
Let's talk about modules
It's common to need additional libraries and modules to build out certain features in your app. Nuxt 3 elevates the concept of modules to a whole new level, simplifying development and making it easier to find Nuxt-specific wrappers for various modules and packages.
From modules built by the Nuxt team, like Nuxt UI (Oh boy! Do I love this!) and Nuxt Image, to external modules that assist with things like authentication, SEO, database management, UI, animations and more, Nuxt 3 opens up a whole new world of possibilities.
I will go into details with some of my favourite modules in a different article cause we just need to talk about it a bit more.
Nuxt UI, I love you!
With Nuxt 3 comes Nuxt UI, which, in the simplest terms, is the best way to build interfaces within Vue and Nuxt. Nuxt UI is a Nuxt module that
"...provides a set of Vue components and composables built with Tailwind CSS and Headless UI to help you build beautiful and accessible user interfaces."
It essentially has almost everything you need to create any kind of modern interface, with amazing and highly customizable components that can cut your development time by up to 80%. I will write a separate article specifically highlighting just how incredible this is.
Nuxt Content is better!
Nuxt Content gets an upgrade! If you didn't already know, Nuxt Content is a file-based CMS built directly into Nuxt. It offers a simple and quick way to build dynamic pages using .yml
, .json
, .md
, and .csv
files.
This upgrade comes supercharged with amazing features like code highlighting, a robust query builder, and one very notable enhancement: the MDC syntax. The MDC syntax allows you to use Vue components within markdown files, which is simply awesome! Nuxt Content also received a massive rewrite, favoring the use of built-in components and composables to make building apps with Nuxt Content much more straightforward.
Nuxt Studio!
While Nuxt Content was already impressive with its recent updates, the Nuxt team has outdone themselves with Nuxt Studio!
"Nuxt Studio is a new editing experience for your Nuxt Content website, offering infinite customization and user-friendly editing. Edit your website with our Notion-like editor and unleash the collaboration between developers and copywriters."
It comes with some truly amazing features like custom components, live collaboration, continuous deployment, preview links, drafts, and more!
Conclusion
If you're a Vue developer (or any kind of frontend developer, really), Nuxt 3 makes life a breeze! It's like having a superpower that makes coding smoother and more enjoyable. With Nuxt 4 on the horizon, I can only imagine I'll be back soon for another epic geek-out session. Stay tuned for more excitement!
PS: You should totally check out Nuxtr if you consistently work with Nuxt. It's a VS Code extension that transforms how you work with Nuxt in VS Code. Although this isn't a paid shoutout, I highly recommend giving it a try!