Rahul Bansal has Published 30 Articles

ReactJS – shouldComponentUpdate() method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 12:01:54

3K+ Views

In this article, we are going to see how to increase the performance of React application by rerendering the component only when the props passed to it changes or on when certain conditions are met.This method is majorly used to take an exit from the complex React lifecycle, but using ... Read More

ReactJS – getDerivedStateFromProps() Method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:58:34

4K+ Views

In this article, we are going to see how to execute a function before the component is rendered.This method is called before the rendering or before any updation of the component. This method is majorly used to update the state, before the rendering of the component, which depends upon the ... Read More

ReactJS – forceUpdate() Method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:52:30

799 Views

In this article, we are going to see how to execute a function by forcibly re-rendering a component.The component in the React lifecycle only re-renders if the props passed to it or its state changes but to forcibly render the component, use the build it forceUpdate method. This method overrides the ... Read More

ReactJS Developer Tools

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:51:51

258 Views

While building a React application, the most-used Chrome extension for debugging the React application or to solve the error is React Developer Tools which is a free-to-use and opensource chrome extension.This extension is used to navigate through the nested component tree of the React Components. It takes a lookup into ... Read More

ReactJS – componentWillUnmount() Method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:45:58

5K+ Views

In this article, we are going to see how to execute a function when the component is deleted from the DOM tree.This method is called during the unmounting phase of the React Lifecycle, i.e., before the component is destroyed or unmounted from the DOM tree. This method is majorly used ... Read More

ReactJS – componentWillReceiveProps() Method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:44:09

7K+ Views

In this article, we are going to see how to execute a function if the props passed to the component is updated in the DOM tree.This method is used during the updating phase of the React lifecycle. This function is generally called if the props passed to the component change. ... Read More

ReactJS – componentDidMount Method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:38:36

1K+ Views

In this article, we are going to see how to execute a function when the component is loaded in the DOM tree.This method is majorly used during the mounting phase of the React lifecycle to handle all the network requests or to set up all the major subscriptions of the ... Read More

ReactJS componentDidCatch method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:34:31

1K+ Views

In this article, we are going to see how to execute a function in the commit phase if some error occurs in the Component.This method is called when a component or any children component encounters some error during the React Component Lifecycle. This method allows us to handle the error ... Read More

ReactJS – bind() method

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:31:09

5K+ Views

In this article, we are going to see how to pass arguments to a function in a React applicationReact has a predefined bind() method which we can use to pass the arguments to a function in the class based components.Syntaxthis.func.bind(this, [args...])It accepts two parameters, this keyword and the arguments. 'this' ... Read More

ReactJS – Axios Interceptors

Rahul Bansal

Rahul Bansal

Updated on 18-Mar-2021 11:29:48

11K+ Views

In this article, we are going to learn how to intercept every request or response that is being sent by Axios Interceptors in a React application.Axios interceptors are the default configurations that are added automatically to every request or response that a user receives. It is useful to check response ... Read More

Advertisements