Also, the two best words of tech probably have to be “backwards compatible”.

React framework Next.js 8 goes serverless for mobile web apps

Jane Elizabeth
Shutterstock / garagestock

Looking for serverless deployment for your JavaScript web apps? Next.js 8 provides a reactive framework for the mobile web while staying incredibly lightweight. Dramatically improve your reliability and scalability with Next.js today!

It’s been a while since we last checked in on Next.js. In that time, this minimalistic framework for JavaScript web apps has gone serverless! Now, developers can take advantage of this reactive framework for the mobile web while maintaining a lightweight footprint.

Next.js is a React framework for creating a single-page JavaScript application. Developers can create customizable server-side apps in a snap; it’s basically like PHP, except with JavaScript and React.

Next.js 8

So, the big news in for Next.js 8 is the support for serverless deployment! Why go serverless? Well, by splitting your application into serverless lambdas, Next.js makes it possible to dramatically improve both reliability and scalability. In general, serverless deployment allows for distributed points of failure. More importantly, it can be much more affordable on a “pay only for what you use” model.

Next.js 8 provides low-level APIs for serverless deployments. Most of the common hosting platforms have their own function signatures, so you’re going to want to add in a compatibility layer around your serverless build.

Next.js’ serverless deployments are optimized for a fast cold start with an incredibly lightweight serverless function. There are absolutely zero dependencies; they’re all included in the function bundle.

To enable serverless mode in Next.js, just add the serverless build target in next.config.js.

SEE ALSO: Next.js: A minimalistic, universal framework for JavaScript web apps

Other improvements for Next.js include a massive reduction in build-time memory. By optimizing the build performance and resource utilization, Next.js has managed to get up to 16 times better memory usage. Now, the memory is released much faster and processes no longer crash under high stress situations.

Speed is always an issue when dealing with web-based pages. There’s a smaller initial HTML size, with an optimized initial payload of 1.16KB. Additionally, the Next.js router makes it possible to pre-fetch pages for faster navigation. However, this does introduce some overhead and loading times might increase as well.

Developer improvements include things like improved on-demand entries, faster port listening, security improvements, API authentication and a faster static export. In particular, Next.js focuses on pre-rendering for a higher performance, with server and static rendering for an increased export of 75 pages per second on a machine with multiple CPUs.

Also, let’s be real, two of the best words in tech have got to be “backwards compatible”. All of these changes are completely backwards compatible. Thank you, Next!

Getting Next.js

Want to try out this reactive framework for yourself? Next.js 8 is easily available via a npm command. More information about setting it up is available here or on GitHub.

Next.js is an open source project and relies on community support. Since the first release, there have been over 600 contributors with at least one commit, and over 2600 pull requests. Join the Next community on if you’d like to get involved with this interesting framework for JavaScript web apps!

Jane Elizabeth
Jane Elizabeth is an assistant editor for

Inline Feedbacks
View all comments