-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy path11-React-States.txt
More file actions
58 lines (15 loc) · 995 Bytes
/
11-React-States.txt
File metadata and controls
58 lines (15 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
11.1 - Definition of state: what is the difference between state and props?
- Props (short for "properties")
- Are external inputs to a React component
- Used to pass data from a parent component to a child component
- Immutable within the receiving component
- Unidirectional flow (parent -> child)
- State
- An internal data storage mechanism within a React component
- It represents the dynamic values that can change over time (event)
- Used to store and manage data that can be modified within a component
- When the state changes, React re-renders the component to reflect those changes
11.2 - Steps to add and use states in your class based component
11.3 - Updating state values in your class based component: handling events in react
11.4 - Updating state values in your class based component: setState() method
11.5 - React component’s lifecycle methods (class based)