NA +91-8727899942 thecoderjob@gmail.com

CHAPTER - 33

Pure component in ReactJs

It is used in class component.

Its helpfull to prevent re-rendring of component.

Here's is the Code !!

import React, { PureComponent } from "react"
class ClassComponent extends React.PureComponent{
    render()
    {
        console.warn("counter re-render")
        return(
            <>
                <h1>Counter Component {this.props.count}</h1>
            </>
        )
    }
}

export default Counter

Chapter 32

Send Data Child to Parent Component

Previous chapter

Chapter 34

useMemo Hook - prevent to re-render

Next chapter

Get In Touch

NA

thecoderjob@gmail.com

+91-8727899942

Popular Links

© www.thecoderjob.com. All Rights Reserved.               Designed by HTML Codex