Soft Delete 🗑 – Node.js, MongoDB

Soft Delete - Node.js, MongoDB

In this article, we will teach you, how you can implement soft delete in your Node.js app with MongoDB as database. We also created a tutorial on how to do soft delete in Laravel, check our tutorial here. Soft delete 🗑 is useful when you do not want to actually delete the record from database, …

2 ways to loop through a number in React

In this article, we will discuss 2 ways how you can loop through a number in React. While developing frontend of an application 🖥, you might encounter a situation where you have to display a list of data. For example, a list of users etc. Most common way to loop through an array in React …

Get updated value from Child to Parent – React

In this tutorial, we will learn how you can get updated value from child component to parent component in React. Let’s say you have a parent child component in your React app. You are sending data from parent to child and your child component is updating that variable’s value. Now when you get the value …

Next and previous links in PHP, MySQL

Next and previous links in PHP, MySQL

If you see a WordPress site, you will notice that at the bottom of the blog listing page, there will be links to next and previous pages. They are useful to move the user to next or previous page. If user is at the last page, then the next button will not be displayed. Similarly, …

Case-sensitive search in MySQL

Learn how to do case-sensitive search in MySQL. By default, MySQL search text-based column values without case sensitivity. For example, if your database looks like this: Table: users id email 1 support@adnan-tech.com 2 support@Adnan-tech.com And if you run the following query: It will return both records. However, it should have return only the 2nd record. …

Pagination in React, Node.js and MongoDB

In this tutorial, we will show you, how you can do pagination in your React app having Node.js and MongoDB as backend. Even if you have any other backend technology, you can still get the algorithm and apply it in your language. React Following is our React component that will call an AJAX request and …

Load more in React, Node.js & MongoDB

Previously, we wrote 2 articles on how to add a “load more” button. First article uses Node.js and MongoDB and EJS for frontend and second article uses PHP and MySQL. In this article, we will show you, how you can create a “load more” button in React with Node.js and MongoDB as your backend. This …

Parse HTML entities in React

If you are working in React and are fetching data from an API that is returning some content with mixed HTML entities. You will notice that when you are rendering the HTML data in React, the HTML entities does not gets rendered properly. It is because React does not parse HTML entities by default. Today, …

Insert new HTML without re-rendering

If you are looking for a way to insert new HTML without re-rendering the previous HTML of the node, you have come to the right place. So let’s say you are working in a Javascript application and are rendering new data using innerHTML, we will show you a better way i.e. insertAdjacentHTML. insertAdjacentHTML method accepts …

Callback function in React JS

In this article, we will teach you how you can use a callback function to be called from child parent that will invoke a function in parent component in React JS. Let’s say you have: Here, we have a React parent component that has an array of data. Each array element has an ID, name …