How to format relative times in Javascript

How to format relative times in Javascript

Introduction Formatting relative times in JavaScript can be a useful way to present information to the user in a human-readable format. A relative time is a time…

Looping through Javascript Set object in React

Looping through Javascript Set object in React

In React, you can loop over a JavaScript Set using the Array.from() method to convert the Set object to an array. You can then use the map()…

How to Minimize Puppeteer Browser Window To Tray

Looping through Javascript Map object in React

In ReactJS, you can loop over a map using Object.entries() method to convert the Map object into an array of key-value pairs, and then use the map()…

The basic guide for React Query useMutation hook

The basic guide for React Query useMutation hook

React Query is a popular library for fetching, caching, and updating asynchronous data in React applications. It provides a number of hooks, including useMutation that allows you…

How to measure the performance of javascript function

How to measure the performance of javascript function

Introduction There are several ways to measure the performance of a JavaScript function. One way is to use the performance.now() method, which is part of the Performance…

react-heatmap-js-how-to

Build React Heatmap Chart using Highcharts

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…

Jest.mock is not allowed to reference variables

Jest.mock is not allowed to reference variables

Sometimes when trying to mock a function in Jest, you might encounter the following error: Service mocked with Jest causes “The module factory of jest.mock() is not…

Clear all the timeout objects from webpage in-Javascript

Clear all the timeout objects from webpage in Javascript

setTimeout function is used to achieve asynchronous tasks in JavaScript. The return value of setTimeout is an Integer. This value can be passed to clearTimeout method to clear that timeout….

Submit formik form using React-Query mutations

Submit formik form using React-Query mutations

In this article you will learn how to create forms using Formik library, and how to submit the forms using React-Query mutation hook. We will cover the…