Client-Side Rendering (CSR) vs. Server-Side Rendering (SSR) in Next.js

Client-Side Rendering (CSR) vs. Server-Side Rendering (SSR) in Next.js

Tiempo de lectura: 2 minutos If you use Next.js, you can perform client-side rendering (CSR) or server-side rendering (SSR). Next, we will analyze the difference between Client-Side Rendering and Server-Side Rendering: Client-Side Rendering (CSR): How It Works: In client-side rendering (CSR), the initial HTML is sent empty or with a basic skeleton from the server. Then, the client’s browser downloads … Read more

How to Create a Context in a Next.js Application with React

How to Create a Context in a Next.js Application with React

Tiempo de lectura: 3 minutos In this tutorial, you will learn how to create a theme context that spans your entire Next.js application using React. This theme context will allow you to dynamically switch between different themes in your application, such as light and dark themes. Step 1: Initial setup Make sure you have Node.js installed on your system. Then, … Read more

Folder Architecture of a React Project with Next.js

Folder Architecture of a React Project with Next.js

Tiempo de lectura: 2 minutos Today I am going to share a folder structure that you can use to organize your React project with Next.js. When working with React and Next.js, it is common to organize your project into several folders to maintain a clean and easy-to-understand structure. Here is a typical folder structure that can be used: pages: This … Read more

Docker Compose to Deploy React with Next.js in Production with Nginx + Next.js

Docker Compose to Deploy React with Next.js in Production with Nginx + Next.js

Tiempo de lectura: < 1 minuto Today I’m going to share with you a much-needed Docker Compose setup that will allow you to deploy a fully functional website using Nginx and React with Next.js in just a few minutes. The first thing you need to do is create the docker-compose.yml file: version: ‘3’ services: nextjs-app: build: context: . ports: – “3000:3000” … Read more

Docker Compose for React with Next.js in Development Mode

Docker Compose for React with Next.js in Development Mode

Tiempo de lectura: < 1 minuto Today I bring you a Docker Compose setup to run your React application with Next.js in development mode. The first thing you need to do is create this docker-compose.yml file: version: ‘3’ services: nextjs-app: build: . ports: – “3000:3000” volumes: – .:/app environment: – NODE_ENV=development Now create this Dockerfile: # Use a Node.js alpine image … Read more

Create Build with React and Next.js

Create Build with React and Next.js

Tiempo de lectura: < 1 minuto Today we will learn how to create a build (with the folder) using React Next.js. The first thing we need to do is go to the next.config.mjs file which by default has: /** @type {import(‘next’).NextConfig} */ const nextConfig = {}; export default nextConfig; We will change it to: /** @type {import(‘next’).NextConfig} */ const nextConfig = … Read more

How to Deploy React with Next.js on an NGINX Server

How to Deploy React with Next.js on an NGINX Server

Tiempo de lectura: 2 minutos To deploy the web application we have created with React and Next.js, we will follow these steps: Prepare the application for production: Run npm run build in your Next.js project to build the application. This will generate a build folder containing the optimized production files. npm run build Configure Nginx: You need to configure Nginx … Read more

Create a project with React and Next.js

Create a project with React and Next.js

Tiempo de lectura: 2 minutos Today we are going to learn how to create a React project with Next.js and run it. The first thing we are going to do is to create a new project with this command: npx create-next-app my_app Now it will ask about the configuration. I have chosen and recommend this one: Use TypeScript since it … Read more

Joins in SQL with NULL verification

Joins in SQL with NULL verification

Tiempo de lectura: 2 minutos In SQL, joins are used to combine rows from two or more tables based on a related condition between them. I will show you how to use the most important joins: INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN, with NULL checks to handle unmatched rows. 1. INNER JOIN INNER JOIN returns only the … Read more

Example of Join Types in SQL

Example of Join Types in SQL

Tiempo de lectura: 2 minutos In SQL, joins are used to combine rows from two or more tables based on a related condition between them. There are several types of joins, but the most important ones are: INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN. Next, I’ll show you how to use each one with examples. 1. INNER JOIN … Read more