Preface |
|
xi | |
1 Hello World |
|
1 | (10) |
|
|
1 | (1) |
|
|
2 | (1) |
|
|
3 | (2) |
|
|
5 | (1) |
|
|
6 | (3) |
|
|
7 | (1) |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (2) |
2 The Life of a Component |
|
11 | (24) |
|
A Custom Function Component |
|
|
11 | (2) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
14 | (3) |
|
Properties in Function Components |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
19 | (2) |
|
|
21 | (3) |
|
Event Handling in the Olden Days |
|
|
21 | (2) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
24 | (1) |
|
Props in Initial State: an Antipattern |
|
|
25 | (1) |
|
Accessing the Component from the Outside |
|
|
25 | (1) |
|
|
26 | (1) |
|
Lifecycle Example: Log It All |
|
|
27 | (3) |
|
Paranoid State Protection |
|
|
29 | (1) |
|
Lifecycle Example: Using a Child Component |
|
|
30 | (3) |
|
Performance Win: Prevent Component Updates |
|
|
33 | (1) |
|
Whatever Happened to Function Components? |
|
|
34 | (1) |
3 Excel: A Fancy Table Component |
|
35 | (34) |
|
|
35 | (1) |
|
|
36 | (1) |
|
Table Headers Loop, a Terse Version |
|
|
37 | (2) |
|
Debugging the Console Warning |
|
|
39 | (1) |
|
|
40 | (4) |
|
|
42 | (2) |
|
Can You Improve the Component? |
|
|
44 | (1) |
|
|
44 | (2) |
|
Can You Improve the Component? |
|
|
46 | (1) |
|
|
46 | (2) |
|
|
48 | (5) |
|
|
49 | (2) |
|
|
51 | (1) |
|
|
51 | (1) |
|
Conclusion and Virtual DOM Diffs |
|
|
52 | (1) |
|
|
53 | (7) |
|
|
54 | (3) |
|
|
57 | (2) |
|
|
59 | (1) |
|
Can You Improve the Search? |
|
|
59 | (1) |
|
|
60 | (4) |
|
Cleaning Up Event Handlers |
|
|
62 | (1) |
|
|
63 | (1) |
|
Can You Improve the Replay? |
|
|
64 | (1) |
|
An Alternative Implementation? |
|
|
64 | (1) |
|
|
64 | (2) |
|
|
66 | (3) |
4 Functional Excel |
|
69 | (26) |
|
A Quick Refresher: Function versus Class Components |
|
|
69 | (1) |
|
|
70 | (1) |
|
|
71 | (2) |
|
|
73 | (2) |
|
|
75 | (1) |
|
|
76 | (1) |
|
Lifecycles in a World of Hooks |
|
|
77 | (6) |
|
Troubles with Lifecycle Methods |
|
|
77 | (1) |
|
|
78 | (1) |
|
|
79 | (1) |
|
|
80 | (1) |
|
|
81 | (2) |
|
|
83 | (2) |
|
|
85 | (1) |
|
|
86 | (5) |
|
|
87 | (1) |
|
|
87 | (1) |
|
|
88 | (2) |
|
|
90 | (1) |
|
Excel Component with a Reducer |
|
|
91 | (4) |
5 JSX |
|
95 | (24) |
|
|
95 | (2) |
|
|
97 | (2) |
|
|
99 | (1) |
|
|
100 | (1) |
|
|
101 | (1) |
|
|
101 | (3) |
|
Parent-to-Child Spread Attributes |
|
|
102 | (2) |
|
Returning Multiple Nodes in JSX |
|
|
104 | (2) |
|
|
104 | (1) |
|
|
105 | (1) |
|
|
105 | (1) |
|
Differences Between JSX and HTML |
|
|
106 | (2) |
|
|
106 | (1) |
|
|
107 | (1) |
|
|
107 | (1) |
|
|
108 | (1) |
|
|
108 | (1) |
|
|
109 | (10) |
|
|
109 | (2) |
|
value Versus defaultValue |
|
|
111 | (1) |
|
|
111 | (1) |
|
|
112 | (1) |
|
Controlled and Uncontrolled Components |
|
|
113 | (6) |
6 Setting Up for App Development |
|
119 | (8) |
|
|
119 | (4) |
|
|
120 | (1) |
|
|
120 | (2) |
|
|
122 | (1) |
|
|
123 | (1) |
|
package.json and node_modules |
|
|
123 | (1) |
|
|
124 | (2) |
|
|
124 | (1) |
|
|
124 | (1) |
|
|
125 | (1) |
|
|
126 | (1) |
7 Building the App's Components |
|
127 | (46) |
|
|
127 | (1) |
|
|
127 | (2) |
|
Refactoring the Excel Component |
|
|
129 | (1) |
|
Version 0.0.1 of the New App |
|
|
130 | (1) |
|
|
131 | (1) |
|
|
132 | (1) |
|
|
133 | (3) |
|
|
134 | (2) |
|
|
136 | (4) |
|
|
136 | (1) |
|
|
136 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
140 | (11) |
|
|
140 | (2) |
|
|
142 | (2) |
|
|
144 | (3) |
|
|
147 | (4) |
|
|
151 | (1) |
|
|
152 | (5) |
|
|
157 | (1) |
|
|
157 | (2) |
|
|
159 | (14) |
|
|
161 | (1) |
|
|
162 | (4) |
|
React.Strict and Reducers |
|
|
166 | (2) |
|
|
168 | (5) |
8 The Finished App |
|
173 | (32) |
|
|
176 | (1) |
|
|
176 | (4) |
|
|
178 | (2) |
|
|
180 | (2) |
|
|
182 | (1) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
184 | (3) |
|
|
187 | (6) |
|
|
187 | (4) |
|
Context in the Data Table |
|
|
191 | (2) |
|
|
193 | (2) |
|
|
195 | (9) |
|
|
195 | (2) |
|
|
197 | (2) |
|
Consuming the Route Context in the Header |
|
|
199 | (2) |
|
Consuming the Route Context in the Data Table |
|
|
201 | (1) |
|
|
202 | (2) |
|
|
204 | (1) |
Index |
|
205 | |