Find last index of element inside array by certain condition
In Javascript, the following snippet of code pass over an array of objects and does filter the array based on certain conditions, the output of this process…
Detect If Browser Tab Has Focus In Javascript
There are a few options we can use in order to Detect If Browser Tab Has Focus In Javascript. Some of those options are: 1- Detect using…
How to handle multiple queries with React-Query
A super cool feature of React Query is that we can execute multiple queries in the same component, whether these queries are dependent or independent of each…
How to wait for N seconds in Puppeteer
Puppeteer is a Node library that provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run…
No QueryClient set, use QueryClientProvider to set one
When working with React-Query you might encounter the following error: No QueryClient set, use QueryClientProvider to set one, this source of this error might be one of…
Get the number of days in a month using JavaScript
Introduction There are a few options we can use to get the number of days in a month using JavaScript, let’s check the following examples to see…
Implement Heatmaps using HighCharts in React
Introduction HightCharts is a powerful library for creating data visualizations, It comes with many tools that allow to creation of a reliable and secure chart. This article…
How to detect location hash changes in Javascript
Introduction To detect the browser location hash changes in Javascript, there’s a web API event called hashchange. Which we can rely on to detect the change in…
Conditionally add a new property to JS objects
Introduction Recently, I published an article about How to spread objects in Javascript conditionally. This article won’t have much difference from the previous one, it rather demonstrates…