scrimba
React Bootcamp Course
React.memo()
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

React.memo()
AboutCommentsNotes
React.memo()
Expand for more info
App.js
run
preview
console
import React, {Component} from "react"
import GrandParent from "./GrandParent"

class App extends Component {
state = { count: 0 }

increment = () => this.setState(prevState => ({count: prevState.count + 1}))

render() {
console.log("[GP] [P] [C] [GC] APP just rendered")
return (
<div>
<button onClick={this.increment}>+1</button>
<h2>{this.state.count}</h2>
<p>I'm the App component</p>
<GrandParent />
<GrandParent />
</div>
)
}
}

export default App
Console
β€Ί
"[GP] [P] [C] [GC] APP just rendered"
,
β€Ί
"[πŸ‘΄πŸΌ] [ ] [ ] [ ] rendered"
,
β€Ί
"[ ] [πŸ‘©πŸΌβ€βš•οΈ] [ ] [ ] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [πŸ‘©πŸΌβ€βš•οΈ] [ ] [ ] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[πŸ‘΄πŸΌ] [ ] [ ] [ ] rendered"
,
β€Ί
"[ ] [πŸ‘©πŸΌβ€βš•οΈ] [ ] [ ] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [πŸ‘©πŸΌβ€βš•οΈ] [ ] [ ] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [πŸ§’πŸ»] [ ] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
β€Ί
"[ ] [ ] [ ] [πŸ‘ΆπŸ»] rendered"
,
/index.html
-10:06