Posts tagged "NextJS"

Published: July 28 2023

Next.js 13 + App Router + MongoDB - User Rego and Login Tutorial with Example

How to build a simple user registration, login and user management (CRUD) application with Next.js 13 (App Router) and MongoDB using TypeScript
Published: June 29 2023

Next.js 13 - Fix for client component ('use client') hangs when fetching data in useEffect hook

I ran into a weird problem this morning that had me stumped for a few hours. One of my client components was causing Chrome to lock up and max out my CPU without giving me any error message.
Published: June 09 2023

Fix for MongooseServerSelectionError: connect ECONNREFUSED ::1:27017

Just ran into this error after updating from Node 16 to Node 18.
Published: June 06 2023

Add Google AdSense to a Single Page App - React, Angular, Vue, Next etc...

I recently integrated Google AdSense into my AngularJS blog and this is how I got it working.
Published: April 26 2023

Next.js 13 + MySQL - Connect to MySQL Database with Sequelize in Next.js

How to connect to a MySQL database in Next.js using Sequelize and MySQL2
Published: April 25 2023

Next.js 13 + MySQL - User Registration and Login Tutorial with Example App

In this tutorial we'll go through an example of how to build a simple user registration, login and user management (CRUD) application with Next.js and MySQL.
Published: April 21 2023

Next.js Router - Listen to route (location) change with useRouter

How to detect route changes with Next.js Router to execute code on location change in a Next.js (React) client app.
Published: April 18 2023

Next.js - Access Environment Variables from dotenv (.env)

Quick example of how to create and access environment variables in Next.js with a dotenv (.env) file
Published: April 13 2023

Next.js 13 Middleware for Authentication and Error Handling on API Routes

This is a quick post to show how to add authentication and error handling middleware to all API routes of a Next.js 13 application.
Published: April 11 2023

Next.js 13 + MongoDB - User Registration and Login Tutorial with Example App

In this tutorial we'll go through an example of how to build a simple user registration, login and user management (CRUD) application with Next.js and MongoDB.
Published: March 31 2023

Next.js 11 + MongoDB - Connect to Mongo database with Mongoose

How to connect from Next.js to MongoDB using Mongoose, and automatically create/update the Mongo database from code.
Published: September 04 2021

Next.js - Required Checkbox Example with React Hook Form

This is a quick example of how to implement a required checkbox field in Next.js the React Hook Form library.
Published: September 03 2021

Next.js - Form Validation Example with React Hook Form

This is a quick example of how to setup form validation in Next.js with the React Hook Form library.
Published: August 31 2021

Next.js - Combined Add/Edit (Create/Update) Form Example

This is a quick example of how to build a form in Next.js with the React Hook Form library that supports both create and update modes.
Published: August 30 2021

Next.js - Redirect to Login Page if Unauthenticated

A quick post to show how to redirect users to the login page in a Next.js front-end (React) app.
Published: August 29 2021

Next.js - Basic HTTP Authentication Tutorial with Example App

How to build a simple full stack login application in Next.js that uses Basic HTTP Authentication.
Published: August 28 2021

Next.js - Read/Write Data to JSON Files as the Database

This is a quick post to show how to manage (read/write) data in a JSON flat file with Next.js, it's useful for building example apps or for when you need to get up and running quickly before setting up a full database such as MongoDB, MySQL, SQL Server etc.
Published: August 26 2021

Next.js - Alert (Toaster) Notifications

A tutorial and example showing how to implement alert / toaster notifications in Next.js.
Published: August 23 2021

Next.js API - Global Error Handler Example & Tutorial

This is a quick post to show how to implement a global exception handler in a Next.js API.
Published: August 20 2021

Next.js API - Add Middleware to API Routes Example & Tutorial

This is a quick post to show how to add middleware to the request pipeline of a Next.js API so it supports similar functionality to ExpressJS.
Published: August 19 2021
Last updated: March 31 2023

Next.js 11 - User Registration and Login Tutorial with Example App

In this tutorial we'll go through an example of how to build a simple user registration, login and user management (CRUD) application with Next.js.
Published: August 04 2021

Next.js 11 - JWT Authentication Tutorial with Example App

This tutorial shows how to build a simple full stack login application in Next.js that uses JWT authentication.
Published: July 30 2021

Next.js + Webpack - Fix for ModuleNotFoundError: Module not found: Error: Can't resolve '...'

If you're building a Next.js app that uses a Node.js module that only exists on the server-side such as the file system (fs) module, you may see the following error on build because the module can't be found on the client-side (the browser).
Published: June 01 2021

Next.js - NavLink Component Example with Active CSS Class

This is a quick post to show how to create a custom NavLink component in Next.js that extends the built-in Link component to add the CSS className "active" when the href attribute matches the current URL.
Published: May 31 2021

Next.js - Make the Link component work like React Router Link

How to create a custom Link component that wraps the built-in Next.js link component to make it work more like the standard link component from React Router.
Published: April 20 2021

Next.js 10 - CRUD Example with React Hook Form

This tutorial shows how to build a basic Next.js CRUD application with the React Hook Form library that includes pages that list, add, edit and delete records using Next.js API routes.
Supported by