React
Understanding the useRef React hook
Continuing our React hooks series, we will learn about the useRef React hook in this blog post.The useRef...
React
Use redux-like middleware for useReducer in React
If you have used Redux before, you would be aware of the concept of middlewares. Now that useReducer has become a commonly...
React
How to write your own custom React hooks
If you have been using react for a while, chances are you have come across the need to extract some logic into...
React
Provide callback to useState hook like setState
If you have been writing class components for a while, you might be familiar with the callback functionality that the setState function...
React
Detecting click outside component using React hooks
If you have tried developing your own dropdown, modal, or popover in React, you would have come across this. "How do I...
React
Learning context API and the useContext React hook
In this react hooks series, we have already explored the react hooks useState, useEffect, and useReducer. The next react hook we will...
Recent Articles
Chrome devtools: Using logpoints for logging messages directly
When it comes to debugging JavaScript in Chrome devtools, there are two different camps: the console.log fans and the debugger/breakpoint maximalist. I...
How to prevent npm install for unsupported Node.js versions
npm configurations allow us to do quite a lot of nifty things. One of them is to allow the project to set...
How to terminate a process on a port using the command line
Zombie processes are usually a pain to figure out. More often than not, I end up googling about how to terminate a...
Detecting dark mode preference using JavaScript
As dark themes have become popular across the web and across operating systems, we might want to check the user's operating system...
JavaScript: Split string and keep the separators
String.prototype.split() is a valuable method to split strings based on a delimiter. There often comes a scenario when we want to split...

Hi there! Want some more knowledge?
Think that the knowledge shared is helpful? You might want to give our mailing list a try. We'll send you 2-4 emails a month, right when new posts come out.