In this article, we will see different ways to split a string based on the given length in javascript. Using substring() The substring() method returns the part of a string between the start and end indexes (Including), or a specified…
There are several use cases of React.forwardRef. One of its main features is the ability to pass the data from parent components to the child components through the props. Using the React.forwardRef, we can pass a ref to child component…
In this article, we will see how to prevent the user from clicking the button again and again until the required action is completed. By using the state variable, we can keep track of whether the button is clicked or…
In this article we will see how to get previous month date using java. By using the classes such as LocalDate & TemporalAdjusters inside the time package, we can easily get the date of the previous month. Let’s first import…
In this article, we will see how to remove a specific commit at the middle in git. Please make sure the changes are purely local and not yet pushed to remote. If the changes are already pushed to the remote…
In this article, we will see what is the major difference between useRef and createRef along with some examples and when to use each one. createRef createRef is used in the class components to create and manage the references to…
In reactJS, when an event occurs it is propagated from the innermost element that triggered the event to its parent elements, until it reaches the topmost element in the DOM. This is also known as the ‘event bubbling‘. There are…
In this article, we will see how to update the state on the button click in reactJS. We use the useState hook to manage the state in reactJS. useState hook returns the state variable and a callback function to update…
In this article, we will see how to make API calls using the functional components. Importing required libraries: There are some libraries available and by using those we can make API requests in react. For this, we can use the…
In this article, we will see how to use git checkout to create a local copy of a remote branch. In order to create a local copy of remote branch, First, we need to fetch the remote branch. Open the…