Fix: Hydration failed because the initial UI does not match what was rendered on the server

11 months ago

Within a React or Next.js app, if you encounter the error "Hydration failed because the initial UI does not match…

How to keep the screen awake using JavaScript

12 months ago

Some new features in JavaScript are great to see, and the wake lock API is one of those. It allows…

Using RegEx groups for Search & replace in VS Code

12 months ago

VS Code has a nifty tool for doing search and replace using RegEx, which I prefer using whenever doing bulk…

How To Fix ReferenceError: __dirname is not defined

1 year ago

I recently tried to use __dirname inside a ES module. It turns out, that I cannot. It throws an error. So let us…

How to detect caps lock with JavaScript

1 year ago

The need to verify and notify the user if the Caps Lock key is on is fairly common. It is…

Creating new TypeScript types using template literal types

1 year ago

TypeScript is way more powerful than I give it credit for. I recently learned about creating new TypeScript types using…

React TypeScript: Simplify Imports with Path Aliases

1 year ago

As codebases grow larger and more complex in structure, imports can become unmanageable. As more directories are added, imports become…

Fix Cannot find module ‘fs’ or its corresponding type declarations.ts(2307)

1 year ago

I recently ran into the error "Cannot find module 'fs' or its corresponding type declarations.ts(2307)" while I was using VSCode…

Why should we not use index as key in React Lists

1 year ago

When working with React, developers often come across the need to render lists of items efficiently. Every item in a…

Delete git branches that do not exist on remote

1 year ago

After working on a project for a while, there will come a time when we will end up with a…

Advertisements