So, what is NextJS?
And why could learning NextJS be a good idea?
And why could NextJS in general,
be helpful to us as a React developer?
If we visit nextjs.org, the official NextJS website,
we learn that NextJS is the react framework for production.
Okay, so that sounds like a good argument.
We all want to build production apps, right?
So NextJS is certainly helpful then, but wait a second.
What exactly does this mean?
So NextJS calls itself a React framework for production
and that name makes a lot of sense
because NextJS offers a lot of features that make building
large scale production ready, React apps easier.
But I personally also like to call NextJS
a full stack framework for ReactJS.
And it's the full stack part
which I want to highlight here.
But I will come back to that.
Let's first of all, focus on the framework part.
Isn't ReactJS itself, already a framework or a library?
Well, indeed it is.
React is labeled a JavaScript library
for building user interfaces.
And that means that it's a third party package
which you can add to your front end projects.
So it's all about client side Java script code in the end.
And you can use React there
to build interactive user interfaces.
And it's a library that makes building
complex user interfaces way easier
than it would be with just JavaScript.
I got separate courses and videos on React
where I explain why React is awesome.
So I'll not focus on this here.
So React already is such a library
and it's called a library because in its core,
it's really only focusing on that user interface part,
on components, state props.
If you want to build large scale React projects,
you typically also need to add extra libraries for routing,
maybe libraries that help you with authentication
and things like that.
Now NextJS is labeled a framework
and a framework that builds up on React.
Now the difference between a framework and a library
in the end is that a framework is bigger.
It has more features than a library.
It's focusing on more things instead of just a single thing.
And it's also giving you clear rules,
a clear guidance on how you should write your code,
how you should structure your files and so on.
And all these are things which NextJS does
as you're going to learn from this course.
But it's also a framework
building up on another library already on React
because it enhances React, you could say.
It makes building large scale React apps easier.
And that's the part where we're back
on this for production part here.
NextJS has the goal to make the life easier
for you as a React developer.
And it builds up on React,
it enhances React by adding many core features
which you have to add to React apps on your own otherwise.
Things like routing, but also many other things.
And I'll come back to that in just a second.
And we're going to dive into the key features
added by NextJS.
But NextJS simply adds a lot of features to your React app.
They then are there out of the box
once you start using NextJS and it definitely ensures
that you don't have to reinvent the wheel as often.
You don't have to add as many third party libraries
to solve common problems, which you need in bigger apps,
in which you typically need to solve
when building real production React apps.
And that's why NextJS is called a framework
because it has a lot of features, clear rules.
Why it's a framework for React;
because it builds up on React.
It enhances React, it uses React.
You still write React code.
You still build React components,
but it's a framework for production
because it adds all those missing features
which you typically do need to add to React apps
to really prepare them for production
and to solve common problems.
And with that, let's now take a closer look
at the actual features added by NextJS
so that we understand where it helps us exactly
and why using it is a great idea and makes our life easier.