Optimising Developer Experience with Nuxt 3

Rate this content
Bookmark

Optimising developer experience with Nuxt 3 - a tour through the ways the new version of Nuxt will save time and make your life easier. We'll explore the new nitro-powered isomorphic fetch, dive into Nuxt 3's more powerful dynamic routing, and along the way tour a host of other features that will give you superpowers.

Daniel Roe
Daniel Roe
26 min
20 Oct, 2021

Comments

Sign in or register to post your comment.

Video Summary and Transcription

This Talk discusses optimizing developer experience with Nuxt 3. It highlights improvements in documentation, auto importing libraries, server developer experience, and deployment. Nuxt 3 introduces a unified solution for schema, documentation, and defaults, as well as auto imports for easy component access. It also introduces a faster server framework called H3 and allows for efficient network requests with isomorphic fetch. Deployment is simplified with a single entry point and support for various platforms. The goal is to make Nuxt 3 amazing and backport features to Nuxt 2 apps.

1. Introduction to Developer Experience with Nuxt 3

Short description:

Hi, I'm Daniel Rowe, and I'm going to be talking about optimizing developer experience with Nuxt 3. Developer experience is a topic close to my heart. The more we make opportunities for creativity and reduce constraint, the better developer experience we see. NUXT is a view framework, a JavaScript framework, suitable for someone with no knowledge of it.

Hi, I'm Daniel Rowe, and I'm going to be talking about optimizing developer experience with Nuxt 3. Developer experience is a topic close to my heart and I think that's probably true for most of us here today. It matters a huge deal, doesn't it? The tools we use have the capacity to make our life painful or make it magical.

At the moment I'm speaking in my role as a member of the framework team for Nuxt itself which means I get to maintain and work on the framework alongside a huge community of people who contribute and make Nuxt possible. In my previous role though I was CTO for a tech startup. Our main product was built on Nuxt and so I've really encountered Nuxt from both angles both as a user being frustrated by issues trying to solve them and in fact contributing and fixing issues was my first way of contributing to the Nuxt community, but I also of course have now got the perspective of working on the the Nuxt team too and really I'm going to be thinking about developer experience from both perspectives today.

This is where I'm based. I'm in the northeast of the UK, it's already cold and crisp, it's definitely autumn and this is where I sit most days. I'll look across my desk and see my cat, one of my cats, I have three but that's Lily in the picture and I'll have a cup of coffee if it's in the morning or a cup of tea if it's the afternoon and this is where I like to be. I like to sit and code or chat, figure out problems and try and make things better. This is where I feel most in the zone.

So I have a question for you, when have you felt most productive, most in the zone, most in that flow state that we sometimes talk about as developers? Just take a moment call it a mind, see if you can freeze that moment in your head. It might have been that you were confronting a problem. You had some great idea that you were implementing. You'd been on a bug hunt for it seems like ages and you've found it at last. Maybe you've published a library and you're seeing the GitHub stars come in, or you've just seen your first PR merged. Whatever the reason, it feels like you are on top of the world.

So the more I've thought about my own moments of being in the zone or talk to others who have had the same experience. I think there are a lot of things that go into them and it's a hugely complex topic. Obviously we want to replicate it. It's addictive. It's a wonderful moment in time and it depends on lots of things going on. Everything from your own personal well-being, to how much sleep you've had, how much caffeine you've ingested, to whether people are treating you well or fairly, whether they are giving you the value that you deserve, how you feel about yourself.

But there are some common factors I think when it comes to thinking about the tooling that we use which is particularly of course the topic that I'm thinking about today ways in which the tooling we use can promote that in the zone moment, can promote our developer experience and I think it's particularly around these two axes. So on the one hand constraint things that are holding us back and on the other creativity the things that we're trying to do that sense of vision or energy or impetus that we have. And now when I'm talking about constraint I'm not talking about the constraints that you work with when you're trying to find a solution to a problem like a business problem I'm talking about the constraint that's more like red tape that just holds you back that prevents you from implementing the idea that you might have. Obviously that might be hugely oversimplifying it but I think you see great developer experience when you have that creativity when you're going with the flow you have some amazing idea and there's very little if anything to prevent you from realizing it.

So the more we we make opportunities for creativity and the more we reduce constraint I think we see better developer experience and that is really where NUXT has always sought to position itself. Don't worry if you don't know what what NUXT is, NUXT is a view framework, a JavaScript framework. It's a it's a progressive framework which means that it's suitable for someone with no knowledge of it.

2. Improvements in NUXT 3

Short description:

NUXT is a progressive framework that takes away a lot of boilerplate and allows you to focus on your ideas. With NUXT 3, we've made improvements in documentation, auto importing libraries, server developer experience, and deployment.

You can pick up NUXT, install a NUXT project and you should be able to start developing straight away. It doesn't require extra configuration, it works out-of-the-box but if you need to take ownership of it and take full control you can do that. As you start building with NUXT you can configure pretty much anything. In fact with the modules ecosystem and the whole modules container you can configure everything about NUXT and make it work almost in a completely different way from how it did when you first picked it up.

It's a progressive framework but it really is meant to take away a lot of the boilerplate. That zero configuration side of things is hugely important, it's in the NUXT DNA. So when you pick up your NUXT project you might see there's a pages folder, just drop any Vue component in there and it will become a root into your app it will be bundle split, it will be set up with Vue router, it will have a name. All the things that you might have to do previously as part of the boilerplate of a Vue project gets done for you automatically by NUXT. More recently you might have wanted to have a static website. NUXT makes server-side rendering possible. In fact it was one of the few solutions that did early on in the days of Vue applications, it was quite a complicated thing to set up and NUXT made that possible and more recently with static site generation, NUXT makes that possible too. Lots of other things from VueX store integrations to automatic registration of middleware. I think probably the main thing that I'd highlight is this concept of modules. The idea if you need to implement a progressive web app or you need to implement authentication you don't have to do it yourself. You have a CMS you want to integrate or some other service you just pull in the module for it and NUXT makes it possible for you to get on with your idea without actually needing to step back and figure out the boiler plate you would require to properly set up that service or re-implement that that concept. So no need to reinvent the wheel. The concept of NUXT is really to free you from constraint and free you to focus on that idea you have your vision.

NUXT 3 really takes the same path again. So with NUXT 3 there are lots of things to talk about, lots of ways in which we've tried to improve developer experience, but I want to focus on four today in particular. I want to focus on how we've sought to improve the documentation, because and that might sound minor, but I think it's quite a profound way in which we've sought to change the documentation, make NUXT easier for devs to use. I want to focus on how we're auto importing libraries, helper functions, and components. I want to think about our server developer experience. This is really possibly a completely different way of approaching server side functionality, and I want to think about the deployment, and how we've sought to make the developer experience of taking an app, and actually deploying it effortless and amazing. So first to dive into documentation. And when I'm talking about documentation, let me use the example of the Nuxt configuration schema. So the Nuxt configuration schema is an example of something that we need huge documentation for. If you go to the current Nuxt2 docs, you'll see there are pages and pages and pages of information about how to configure Nuxt, not that you have to do this, but when it comes to taking full control of your Nuxt application, there are lots of ways we provide to do that. And that's part of what it is to have a progressive framework. We have to give options because there's so much the framework does, so much heavy lifting it does for users. But the moment you have something that has a lot of configuration, it means that it's possible for the application itself and the documentation to diverge.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Welcome to Nuxt 3
Vue.js London Live 2021Vue.js London Live 2021
29 min
Welcome to Nuxt 3
Top Content
Explain about NuxtJS codebase refactor and challenges facing to implement Vue 3, Vite and other packages.
Remix Flat Routes – An Evolution in Routing
Remix Conf Europe 2022Remix Conf Europe 2022
16 min
Remix Flat Routes – An Evolution in Routing
Top Content
This talk introduces the new Flat Routes convention that will most likely be the default in a future version of Remix. It simplifies the existing convention as well as gives you new capabilities.
Making Magic: Building a TypeScript-First Framework
TypeScript Congress 2023TypeScript Congress 2023
31 min
Making Magic: Building a TypeScript-First Framework
I'll dive into the internals of Nuxt to describe how we've built a TypeScript-first framework that is deeply integrated with the user's IDE and type checking setup to offer end-to-end full-stack type safety, hints for layouts, middleware and more, typed runtime configuration options and even typed routing. Plus, I'll highlight what I'm most excited about doing in the days to come and how TypeScript makes that possible not just for us but for any library author.
Building a Better Hammer - The Story of Nuxt 4
Vue.js Live 2024Vue.js Live 2024
28 min
Building a Better Hammer - The Story of Nuxt 4
We'll explore what's new in Nuxt 4, and the architectural decisions we've made to make it 'a better hammer', no matter what kind of project you're facing. I'm aiming for something useful for anyone, even if they don't use Nuxt. So thinking about framework philosophy, and inspiring people with what's under the hood.
How to Make a Web Game All by Yourself
JS GameDev Summit 2023JS GameDev Summit 2023
27 min
How to Make a Web Game All by Yourself
It's never been easier to make your own web game, but it's still extremely difficult. What game should you make? Which engine should you choose? Let's discuss how to answer these problems and ways to leverage the unique platform that is the web.
Atomic Deployment for JS Hipsters
DevOps.js Conf 2024DevOps.js Conf 2024
25 min
Atomic Deployment for JS Hipsters
Deploying an app is all but an easy process. You will encounter a lot of glitches and pain points to solve to have it working properly. The worst is: that now that you can deploy your app in production, how can't you also deploy all branches in the project to get access to live previews? And be able to do a fast-revert on-demand?Fortunately, the classic DevOps toolkit has all you need to achieve it without compromising your mental health. By expertly mixing Git, Unix tools, and API calls, and orchestrating all of them with JavaScript, you'll master the secret of safe atomic deployments.No more need to rely on commercial services: become the perfect tool master and netlifize your app right at home!

Workshops on related topic

Using Nitro – Building an App with the Latest Nuxt Rendering Engine
Vue.js London Live 2021Vue.js London Live 2021
117 min
Using Nitro – Building an App with the Latest Nuxt Rendering Engine
Top Content
Workshop
Daniel Roe
Daniel Roe
We'll build a Nuxt project together from scratch using Nitro, the new Nuxt rendering engine, and Nuxt Bridge. We'll explore some of the ways that you can use and deploy Nitro, whilst building a application together with some of the real-world constraints you'd face when deploying an app for your enterprise. Along the way, fire your questions at me and I'll do my best to answer them.
Going on an adventure with Nuxt 3, Motion UI and Azure
JSNation 2022JSNation 2022
141 min
Going on an adventure with Nuxt 3, Motion UI and Azure
WorkshopFree
Melanie de Leeuw
Melanie de Leeuw
We love easily created and deployed web applications! So, let’s see what a very current tech stack like Nuxt 3, Motion UI and Azure Static Web Apps can do for us. It could very well be a golden trio in modern day web development. Or it could be a fire pit of bugs and errors. Either way it will be a learning adventure for us all. Nuxt 3 has been released just a few months ago, and we cannot wait any longer to explore its new features like its acceptance of Vue 3 and the Nitro Engine. We add a bit of pizzazz to our application with the Sass library Motion UI, because static design is out, and animations are in again.Our driving power of the stack will be Azure. Azure static web apps are new, close to production and a nifty and quick way for developers to deploy their websites. So of course, we must try this out.With some sprinkled Azure Functions on top, we will explore what web development in 2022 can do.
How to create editor experiences your team will love
React Advanced Conference 2021React Advanced Conference 2021
168 min
How to create editor experiences your team will love
Workshop
Lauren Etheridge
Knut Melvær
2 authors
Content is a crucial part of what you build on the web. Modern web technologies brings a lot to the developer experience in terms of building content-driven sites, but how can we improve things for editors and content creators? In this workshop you’ll learn how use Sanity.io to approach structured content modeling, and how to build, iterate, and configure your own CMS to unify data models with efficient and delightful editor experiences. It’s intended for web developers who want to deliver better content experiences for their content teams and clients.