Photo by H C on Unsplash

More articles in this area

Article

API Routes and middleware in NextJS

API Routes let you create an API endpoint inside a Next.js app. An endpoint that shall be available at localhost:3000/api/hello must have a file pages/api/hello.js with the following content:

Article

Customizing App, Document and Error Pages in NextJS

Next.js uses the App component to initialize pages. You can override it creating a ./pages/_app.js file if, for example. you want to do some of the following things:

Article

Deploying a NextJS app

next build builds the production application in the .next folder. After building, next start starts a Node.js server that supports hybrid pages , serving both statically generated and server-side…

Article

Environment variables in NextJS

Next.js has built-in support for loading environment variables from .env.local into process.env .

Article

Handling images and other assets in NestJS

Files inside public can be referenced from the root of the application. That is useful to serve static assets like robots.txt and images. For example, if you add an image to public/me.png , the…

Article

Installing NextJS

As of december 2022 you need node version 14.6 or later to run NextJS.

Article

Next CLI

// Start the application in development mode (hot-code reloading, error reporting, etc) next dev next dev mydir -p 8080 // build application in current directory's .next folder next build next build…

Article

Pages, Routing and Navigation in NextJS

In Next.js, a page is a React Component exported from a file ( .js , .jsx , .ts , or .tsx ) in the pages directory . The component can have any name, but you must export it as a default export.

Article

Rendering and data fetching in NextJS

Each generated HTML is associated with minimal JavaScript code necessary for that page. When a page is loaded by the browser, its JavaScript code runs and makes the page fully interactive. This…

Article

Styling in NextJS

Next.js allows several possibilities for styling:

Article

Testing with Jest in NextJS for TypeScript

Add to package.json :

Article

Using NextJS with TypeScript

Create an empty tsconfig.json file in the root of your project and add dependencies:

Article

Debug NextJS with Nx in Jetbrains

Creating a debug session for NextJS within a Nx workspace is not an easy straightforward task as this NX issue shows (after two years the issue is still open). Solutions are mentioned for VSCode, but…

Tags

Search articles

Type a word to search published articles.

Open the search page