In this article, we will discuss about how to use, when to use the git bisect. What is git bisect? Git bisect is a command line tool that helps us to find the commit introduced a bug or regression in…
Programming
In this article, we will discuss the correct use of arrow functions in reactJS. Arrow functions have become a popular way of defining functions in JavaScript and these functions can be used in various ways to define component methods and…
In this article, we will see how async/await works in react rendering Both of these API’s are co-related and are used to write asynchronous code in javascript. These are based on the promise API. The async keyword is used to…
Using the <Link/> we have different ways to navigate between different routes in a single-page application. <Link /> component creates a hyperlink with which we can navigate to another route without reloading the page. There are some cases, where we…
In this article, we will see how to use multiple refs to a single component in React. What are refs in react? refs in react are used to access dom nodes or the components of a rendered elements. By default,…
One common problem where developers face when using the React Router is unable to redirect to a route programmatically, or the Redirect component of the react router not working. Redirect not used inside a Router The Redirect component needs to…
In this article, we will explore how to reload a page on the route change in React. This is a very common requirement when building the dynamic web pages using reactjs. React router allows us to define routes and map…
In this article, we will see how to compare oldValues and newValues using the React Hooks useEffect(). In some cases, we may need to perform certain actions only after the value in the state changes. In such a scenario, we…
In this article, we will see how to use the setState() callback with React hooks. The setState() method is used to update the state of a component. When we call the setState(), React updates the component’s state and re-renders the…
In this article, we will see how to add the custom attribute to the element. What is a custom attribute in React? A custom attribute in React is an HTML attribute that isn’t already built into the library. Custom attributes…