Next.js

Next.js: Fetching Data in Server Components

Updated: December 14, 2023 By: Frienzied Flame

Next.js is one of the most popular open-source frameworks for building modern web applications. It offers a rich set of features that makes it a top choice among…

3 Ways to Set Background Image in Next.js

Updated: September 6, 2023 By: Khue

This succinct, practical article will show you some different ways to set an image background in Next.js 13 and above (with the /app directory). Without any further ado…

Next.js Warning: Extra attributes from the server [solved]

Updated: June 14, 2023 By: Khue

This concise and straight-to-the-point article will show you some different ways to get rid of an annoying warning that often shows up in your console when working with…

Next.js: 2 ways to get the current route’s path

Updated: May 20, 2023 By: Goodman

In this article, Sling Academy will show you 2 distinct ways to get the URL path of the current route in Next.js 13 or a later version of…

Solving Next.js error: NextRouter was not mounted

Updated: May 19, 2023 By: Frienzied Flame

This concise article shows you how to fix a common error related to NextRouter in Next.js The Problem When working with Next.js 13 or a newer version of…

Next.js: How to Extract Request Headers (4 Approaches)

Updated: April 27, 2023 By: Khue

This article shows you a couple of different ways to extract request headers in Next.js (we will focus on Next.js 13 and use TypeScript in the upcoming examples)….

Next.js Error: Hooks are not Allowed in Server Components

Updated: April 26, 2023 By: Wolf

The problem When working with a new version of Next.js (13.x or higher) and using the app directory instead of the traditional pages directory, you might run into…

How to Import & Display Local Images in Next.js

Updated: March 28, 2023 By: Goodman

When developing web apps with Next.js, there might be cases where you want to import and use local images instead of network images, such as logos, placeholders, download…

Next.js: Using getServerSideProps() with TypeScript

Updated: March 28, 2023 By: Goodman

Overview In Next.js, the getServerSideProps() function is a way to fetch data on the server side and pass it as props to your page component. It is useful…

Next.js: How to organize code in an “src” folder

Updated: March 27, 2023 By: Goodman

By default, Next.js puts your pages folder in the root directory of your project. However, you can store your source code (including pages, components, CSS styles, and utility…

1 5 6 7 8 9 11