Next.js

Next.js is a new framework for universal server-rendered React applications. It doesn't need configuration since it's using the file-system as API. Every file inside the pagesfolder is its own route. This is very similar to PHP, but with the difference, that the same code runs on the server and on the client. It comes with following features:

Server rendering

This is one of Next.js's core features, but it was already discussed earlier in this paper.

Automatic transpilation and bundling

It's not necessary to transpile or bundle the source, since Next.js does this automatically. This means it's possible to use ES2016 without setting up the transpile-process. Bundling is the process of taking the code from all the different source files, and combining them into one. This reduces the amount of request the browser has to make, which leads to better load times.

Hot code reloading

In a traditional development work-flow, it's an requirement to reload the application every time there is a change. In some cases this was made automatically for the user. There is a problem with this approach: If the state of the application is changed (like toggling a button) and the application is reloaded, this state gets reset, due to the reload. With hot code reloading this is different. It doesn't reload the whole page. It only replaces the parts that have really changed.

results matching ""

    No results matching ""