What is ReactJS Pure Components?

Answer

ReactJS has provided us a Pure Component. If we extend a class with Pure Component, there is no need for shouldComponentUpdate() Lifecycle Method. ReactJS Pure Component Class compares current state and props with new props
and states to decide whether the React component should re-render itself or Not.

import React from ‘react’;

export default class Test extends React.PureComponent{
render(){
return <h1>Welcome to GeeksforGeeks</h1>;
}
}

All react js Questions

Ask your interview questions on react-js

Write Your comment or Questions if you want the answers on react-js from react-js Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---