You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ You need to have `node`and `npm`installed in your computer.
12
12
13
13
## Exercise
14
14
15
+
Before you start, there are two types of components [Functional Components and Class Comonents](https://reactjs.org/docs/components-and-props.html#functional-and-class-components). Use a Functional component if your component doesn't have state.
16
+
17
+
### Tasks
18
+
15
19
1- Refactor the “about” and “footer” sections by creating a stateless component for each. Make sure everything works.
16
20
17
21
@@ -21,10 +25,10 @@ You need to have `node`and `npm`installed in your computer.
21
25
3- Refactor the books section by creating a stateless component and pass the dependencies via props. Make sure everything works.
22
26
23
27
24
-
4- Is there any state in app that should be in the Books component? Refactor <Books> books if appropriate. Should <Books> be a stateless component or a class now?
28
+
4- Is there any state in app that should be in the Books component? Refactor <Books> books if appropriate. Should <Books> be a stateless component or a class now?
25
29
26
30
27
-
5- Break <Books> down into <BookList> and <BookFilter>
31
+
5- Break <Books> down into <BookList> and <BookFilter>
28
32
29
33
30
34
6- What do you think it would make sense to componentize next? Are there any parts on that view that you can reuse? Try to explain to a mentor what you want to refactor before you code :)
0 commit comments