Function Runs When Click on Date React Native Calendar Strip If you are using React Native Calendar Strip in your project, you might want to know how to execute a function when the user clicks on a date. Here are two…
Clear SWR Cache SWR is a React Hooks library for data fetching. It caches the data in the client-side to optimize the performance and reduce the number of requests to the server. Sometimes, we need to clear the SWR…
How to Update Kali Linux on VirtualBox As a cybersecurity enthusiast, I frequently use Kali Linux on my VirtualBox to test out tools and perform security assessments. However, it is essential to keep the operating…
Enable CORS on JSON API Wordpress As a web developer, I have faced many issues while developing applications that require data from different sources. One of such problems is enabling CORS on Wordpress JSON API. When my…
View Old Repositories on Github If you have a Github account, chances are you have created or contributed to numerous repositories. Sometimes, you may want to access an old repository that you created or contributed to…
Removing duplicates from an array in PHP If you have a PHP array that contains duplicate values and you want to remove duplicates, there are several ways to do it. Here are some of the most common methods: Using…
How to Only Allow Requests from Domain Express If you want to restrict your server to only accept requests from a specific domain, you can achieve this by configuring your server to verify the "Origin" header of…
How to Solve Material-UI's `fade` Utility Renamed to `alpha` Error If you are using Material-UI's `fade` utility in your JavaScript code, you may have encountered the following error: This error is caused by a recent…
YouTube Trailer npm As a content creator on YouTube, I always try to make my channel look professional and stand out from the crowd. One way to do that is by creating a trailer that highlights what my channel is all…
Summary Row React Table (with Lodash) If you're familiar with React and Lodash, and you're building a table with summary rows, you might find this useful. What is a summary row? A summary row is a row at the bottom of a…
Can We Define the Hooks Inside the if Block? Yes, we can define hooks inside the if block. However, it is not a recommended practice as it can lead to unexpected behavior. Reasons Why Defining Hooks Inside the if Block…
What are Static Props in React? Static Props in React are the properties that are passed down from a parent component to a child component in a read-only manner. These props cannot be modified by the child component…
Clear Timeout JS Timeouts are a mechanism in JavaScript that allow you to delay the execution of a piece of code. If you have set a timeout and want to clear it before it executes, you can use the window.clearTimeout()…
What does "javascript:void(0)" mean? As a web developer, I have come across the term "javascript:void(0)" in my code, and it can be confusing to understand its purpose. Essentially, "javascript:void(0)" is a JavaScript…
What is Chart.js min? Chart.js is a popular JavaScript library for creating responsive and interactive charts and graphs. In order to use Chart.js in your web project, you need to include the necessary Chart.js files in…
React clock via props If you want to create a clock component in React and pass the time through props, there are a few steps to take. Step 1: Create a Clock Component Create a new file called Clock.js and import React…
Apollo UseQuery Bypass Cache If you are using Apollo Client, you might have come across a situation where you want to bypass the cache and fetch fresh data from the server. This is where Apollo's useQuery hook comes in…
How to Get Word Length using JavaScript Getting the length of a word is a common requirement in various JavaScript applications. Fortunately, JavaScript provides several built-in methods to get the length of a string or…
Inner Function in JavaScript As the name suggests, an inner function is a function that is defined inside another function. In JavaScript, inner functions can access the variables and functions defined in their outer…
Styling Elements Using jQuery jQuery is a popular JavaScript library that enables developers to manipulate HTML elements on web pages. It provides a wide range of methods that can be used to style and animate elements…