Posts for September 2021

Published:

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:

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:

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:

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:

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:

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:

Fetch - HTTP DELETE Request Examples

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

Fetch - HTTP PUT Request Examples

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

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

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:

Fetch - HTTP GET Request Examples

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

Fetch - HTTP POST Request Examples

A quick set of examples to show how to send HTTP POST requests to an API using fetch
Published:

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:

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:

.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:

.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