3. Flow Chart for class based
constructor(props) - Initialization
State - Count: 50
render()
this.state.count returns State -
Count:50
Button onclick
No rerendering
happens
setState(count + 2)
render()
TRUE
FALSE
4. Code for Class based
Features:
- The props
- onClick method trigger the
set count and increase the
count variable by 2.