Posts for September 2021

Published: September 30 2021

.NET - Program Class and Main Method in a Nutshell

The Main method is the entry point for a .NET application, when an app is started it searches for the Main method to begin execution. The method can be located anywhere in a project but is typically placed in the Program class.
Published: September 29 2021

.NET + MSBuild - C# Project File (.csproj) in a Nutshell

A .NET project file is an XML document containing MSBuild code that executes when you run the dotnet build command
Published: September 28 2021

.NET 5.0 - CRUD API Example and Tutorial

Tutorial on how to build a .NET 5.0 API that supports CRUD operations.
Published: September 27 2021

React + Fetch - Logout on 401 Unauthorized or 403 Forbidden HTTP Response

A quick example of how to automatically logout of a React app if a fetch request returns a 401 Unauthorized or 403 Forbidden response
Published: September 26 2021

Vue 2/3 + Axios - Interceptor to Set Auth Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for axios requests from Vue.js (v2 or v3) to an API when the user is authenticated
Published: September 25 2021

React + Axios - Interceptor to Set Auth Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for axios requests from React to an API when the user is authenticated
Published: September 24 2021

Angular - HTTP Interceptor to Set Auth Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for HTTP requests from Angular to an API when the user is authenticated
Published: September 23 2021

React Hook Form - Reset form with default values and clear errors

An example of how to reset a React Hook Form with default values and clear form validation error messages.
Published: September 22 2021

Fetch + Vanilla JS - Check if HTTP Response is JSON in JavaScript

This is a quick example of how to check that the response type is JSON for an HTTP request sent the Fetch API (fetch()) which comes bundled with all modern browsers.
Published: September 21 2021

Fetch - HTTP DELETE Request Examples

A quick set of examples to show how to send HTTP DELETE requests to an API using fetch
Published: September 20 2021

Fetch - HTTP PUT Request Examples

A quick set of examples to show how to send HTTP PUT requests to an API using fetch
Published: September 19 2021

React Hook Form - Set form values in useEffect hook after async data load

A quick example of how to set field values in a React Hook Form after loading data asynchronously (e.g. from an API request) with a useEffect hook
Published: September 18 2021

Node.js - Simple Proxy to Pass Through HTTP Requests to an External URL

This is a quick example of how to proxy an HTTP request through a Node.js server to an external URL and return the response.
Published: September 17 2021

React + Fetch - Set Authorization Header for API Requests if User Logged In

A quick example of how to automatically set the HTTP Authorization header for fetch requests from React to an API when the user is authenticated.
Published: September 16 2021

React + Recoil - User Registration and Login Example & Tutorial

Tutorial on how to implement user registration, login and CRUD functionality with React and Recoil, including a live demo application and example back-end APIs built with Node.js and .NET.
Published: September 15 2021

React Hook Form - Password and Confirm Password Match Validation Example

An example of how to validate that a password and confirm password field match in React using the React Hook Form library
Published: September 14 2021

Vanilla JS - Get the max prop value from an object array in JavaScript

A quick example of how to get the maximum value of a property in an array of objects in JavaScript
Published: September 13 2021

React Hook Form - Display custom error message returned from API request

A quick example of how to display a custom error message on a React Hook Form that is returned from an HTTP API request
Published: September 12 2021

React Hook Form - Submitting (Loading) Spinner Example

A quick example of how to display a loading spinner while a form is submitting with the React Hook Form library.
Published: September 11 2021

React + Recoil - Basic HTTP Authentication Tutorial & Example

This tutorial shows how to build a simple login application with React and Recoil that uses Basic HTTP authentication.
Published: September 10 2021

React + Recoil - Set atom state after async HTTP GET or POST request

A quick example of how to set Recoil state after an async HTTP request to an API
Published: September 09 2021

React - Redirect to Login Page if Unauthenticated

A quick post to show how to redirect unauthenticated users to the login page in a React app.
Published: September 08 2021

React - Catch All (Default) Redirect with React Router 5

A super quick post to show how to create a catch all (default) redirect to the home page in a React app that uses React Router v5.
Published: September 07 2021

React + Recoil - JWT Authentication Tutorial & Example

This tutorial shows how to build a simple login application with React and Recoil that uses JWT authentication.
Published: September 06 2021

Fetch - HTTP GET Request Examples

A quick set of examples to show how to send HTTP GET requests to an API using fetch
Published: September 05 2021

Fetch - HTTP POST Request Examples

A quick set of examples to show how to send HTTP POST requests to an API using fetch
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: September 02 2021

.NET 5.0 - Send an Email via SMTP with MailKit

This is a quick example of how to send an email in .NET 5.0 using the MailKit email client library.
Published: September 01 2021

.NET 5.0 - Boilerplate API with Email Sign Up, Verification, Authentication & Forgot Password

How to build a boilerplate .NET 5.0 API that supports email sign up, verification, authentication, role based access control, forgot password, reset password and account management (CRUD) functionality.
Supported by