Note: You are viewing the new Next.js documentation. The old docs are still available here.

Frequently Asked Questions

What browsers are supported?

Next.js supports IE11 and all modern browsers out of the box using @babel/preset-env. In order to support IE11 Next.js adds a global Promise polyfill.

In cases where your own code or any external npm dependencies you are using require features not supported by your target browsers you will need to implement polyfills. If you need to implement polyfills, the polyfills example demonstrates the recommended approach.

Is this production ready?

Next.js has been powering https://zeit.co since its inception.

We’re ecstatic about both the developer experience and end-user performance, so we decided to share it with the community.

How big is it?

The client side bundle size should be measured in a per-app basis. A small Next main bundle is around 65kb gzipped.

How can I change the internal webpack configs?

Next.js tries its best to remove the overhead of webpack configurations, but for advanced cases where more control is needed, refer to the custom webpack config documentation.

What syntactic features are compiled? How do I change them?

We track V8. Since V8 has wide support for ES6 and async and await, we compile those. Since V8 doesn’t support class decorators, we don’t compile those.

See the documentation about customizing babel config for more information.

Why a new Router? Next.js is special in that:
  • Routes don’t need to be known ahead of time, We don't ship a route manifest
  • Routes are always lazy-loadable
How do I fetch data?

It's up to you. You can use the fetch API inside your React components, or getInitialProps for initial data population.

Can I use it with GraphQL?

Yes! Here's an example with Apollo.

Can I use it with Redux?

Yes! Here's an example. And there's another example with thunk.

Can I use a CDN for static assets?

Yes. You can read more about it here.

Can I use Next with my favorite JavaScript library or toolkit?

Since our first release we've had many example contributions, you can check them out in the examples directory.

What is this inspired by?

Many of the goals we set out to accomplish were the ones listed in The 7 principles of Rich Web Applications by Guillermo Rauch.

The ease-of-use of PHP is a great inspiration. We feel Next.js is a suitable replacement for many scenarios where you would otherwise use PHP to output HTML.

Unlike PHP, we benefit from the ES6 module system and every page exports a component or function that can be easily imported for lazy evaluation or testing.

As we were researching options for server-rendering React that didn’t involve a large number of steps, we came across react-page (now deprecated), a similar approach to Next.js by the creator of React Jordan Walke.