Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 7

SECTION - 3

STATE
Contents

 State within React Components


 State Challenge
 State Challenge build
 State Challenge Refactor 1
 State Challenge Refactor 2
State within React Components

 State is the place where data comes from. We should always try to make
State as simple as possible and minimize the number of Stateful
components.
There are 3 things you should know about state
1. Do not modify state directly
2. State updates may be asynchronous
3. State updates are merged
State Challenge

 Consider the ticking clock example


State Challenge build

 State
State Challenge Refactor 1

 State
State Challenge Refactor 2

 State

You might also like