Fireship · @fireship
The Nuxt big thing in web development?
Uploaded April 25, 2022 · Length 4:55
Summary
Fireship reviews Nuxt's unique features, including Auto Imports, Nitro server engine, and data fetching capabilities.
- nuxt
- web development
- javascript
- auto imports
- nitro server engine
- server side rendering
- edge deployment
- server routes
- state management
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:01
it is April 25th 2022 and you're
- 0:04
watching the code report after 16 months
- 0:06
of hard work nujs version 3 has finally
- 0:08
hit release candidate it's been 84 years
- 0:12
and it was well worth the wait it's kind
- 0:13
of like the nextjs for the view
- 0:15
ecosystem and at first glance the only
- 0:16
real difference is just one valve but
- 0:18
the truth is that n has implemented some
- 0:20
really unique features that are about to
- 0:22
blow your mind if you've never used it
- 0:24
imagine a world where every file has
- 0:26
access to every component in your
- 0:27
project so you never have to write an
- 0:29
import statement ever again I never
- 0:30
thought I'd see it in my lifetime but
- 0:32
njs figured out a way to handle Auto
- 0:34
Imports in a way that makes total sense
- 0:36
we'll look at that along with a bunch of
- 0:38
other features over the next few minutes
- 0:40
first we need to talk about its
- 0:41
documentation when you generate a new
- 0:43
project you get this extremely minimal
- 0:44
starting point and you're left wondering
- 0:46
what do I do next well just like view
- 0:48
itself this is a progressive framework
- 0:50
that can do a lot of different things
- 0:51
like build a single page app a static
- 0:53
site a server rendered site a rest API
- 0:56
or all of these things together at once
- 0:58
what stands out in the documentation is
- 0:59
that there's a page that corresponds to
- 1:01
every directory in your project many of
- 1:03
these directories do some magic like
- 1:05
Pages handles all of your routing like
- 1:07
nextjs and I really like how the
- 1:08
documentation explains what every file
- 1:10
in a project will do on top of that it
- 1:12
has traditional API documentation as
- 1:14
well as a ton of examples with
- 1:16
interactive demos now the big core
- 1:18
feature of Nu that makes everything else
- 1:19
possible is a server engine they built
- 1:21
from the ground up called Nitro it
- 1:23
supports SSR and static site generation
- 1:26
but most importantly it allows you to
- 1:27
deploy on the edge like on cloudflare
- 1:29
workers for example that means you're
- 1:31
not limited to node.js and you can
- 1:33
literally run serers side code all over
- 1:35
the world as close as possible to the
- 1:37
end user making your site extremely fast
- 1:39
but the one thing it doesn't do yet is
- 1:40
hybrid rendering where you have some
- 1:42
routes that are static and others that
- 1:44
are server rendered although this will
- 1:45
be supported in the future now the most
- 1:47
important aspect of rendering is how you
- 1:49
fetch data on the server if we go into a
- 1:51
component you'll notice we have a setup
- 1:53
script which contains code that will run
- 1:54
on the server now we can fetch data from
- 1:56
our API or a database with composes like
- 1:59
use async data or more conveniently use


