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
+18-26Lines changed: 18 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,9 @@
3
3
The goal of this exercise is to learn how to think in React.
4
4
5
5
## Prerequisites
6
+
6
7
You need to be comfortable writing JavaScript and HTML to do this exercise. The exercise uses the following ES6 & ES5 features:
8
+
7
9
- Module system ([import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)/ [export](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export))
If you find the exercise too difficult we recommend you to do the following basic React course from [freeCodeCamp](https://learn.freecodecamp.org/front-end-libraries/react/) before.
Before you start, there are two types of components [Functional Components and Class Components](https://reactjs.org/docs/components-and-props.html#function-and-class-components). Try to use a Functional component if the component doesn't have state, you'll need to refactor code a few times during the next exercise :)
28
+
Before you start, there are two types of components [Functional Components and Class Components](https://reactjs.org/docs/components-and-props.html#function-and-class-components). Try to use a Functional component if the component doesn't have state, you'll need to refactor code a few times during the next exercise 😁
26
29
27
30
### Tasks
28
31
29
-
1- Refactor the “about” and “footer” sections by creating a functional component for each. Make sure everything works.
30
-
31
-
32
-
2- Refactor the navbar by creating a Functional Component (AKA stateless components) and pass the dependencies (this.toggleMenu in this case) via props. Make sure everything works by clicking on the "Training" button at the top right of the screen.
33
-
34
-
35
-
3- Refactor the books section by creating a functional component and pass the dependencies via props. Make sure everything works.
36
-
37
-
38
-
4- Is there any state in app that should be in the Books component? Refactor <Books> books if appropriate. Should <Books> be a Functional Component or a Class Component now?
39
-
40
-
41
-
5- Break <Books> down into <BookList> and <BookFilter>
42
-
43
-
44
-
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 :)
32
+
-[ ]1. Refactor the “about” and “footer” sections by creating a functional component for each. Make sure everything works.
33
+
-[ ]2. Refactor the navbar by creating a Functional Component (AKA stateless components) and pass the dependencies (`this.toggleMenu` in this case) via props. Make sure everything works by clicking on the "Training" button at the top right of the screen.
34
+
-[ ]3. Refactor the books section by creating a functional component and pass the dependencies via props. Make sure everything works.
35
+
-[ ]4. Is there any state in app that should be in the Books component? Refactor `<Books>` if appropriate. Should `<Books>` be a Functional Component or a Class Component now?
36
+
-[ ]5. Break `<Books>` down into `<BookList>` and <BookFilter>`
37
+
-[ ]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