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
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,11 +65,11 @@ The goal of this exercise is to understand what's state and how to reason about
65
65
## 🤸♀️ Exercise
66
66
67
67
-[ ]1. Refactor the “about” and “footer” sections by creating a function component for each.
68
-
Make sure everything works.
68
+
Make sure everything works. Hint, you can look at the `src/components/Header.js` as an example.
69
69
70
70
-[ ]2. Refactor the navbar by creating a Function Component.
71
71
Pass the dependencies (`toggleMenu` in this case) via props.
72
-
Make sure everything works by clicking on the "Training" button at the top right of the screen.
72
+
Make sure everything works by clicking on the "Training" button at the top right of the screen. Hint, you can look at the `src/components/Header.js` as an example (heads up, use curly brackets to pass a prop as a function)
73
73
74
74
-[ ]3. Refactor the books section by creating a function component and pass the dependencies via props.
75
75
Make sure everything works.
@@ -80,6 +80,7 @@ The goal of this exercise is to understand what's state and how to reason about
80
80
-[ ]5. Break `<Books>` down into `<BookList>` and `<BookFilter>`
81
81
82
82
## 🏋️♀️ Bonus exercise
83
+
83
84
- What do you think it would make sense to componentize next? Are there any parts on that view that you can reuse? Hint, replace the `<a>` with your `<Link>` component. Who are the children of the `Link` component? The `Link` component should receive a prop called `to` that becomes the href of the `<a href={to} ...`. Try to use the prop called `children` for the text displayed inside the anchor.
84
85
- Can we move the `isMenuOpen` state inside the menu? Does it conflict with the idea of "lifting the state up".
85
86
- If you look at the [React Profiler](https://reactjs.org/blog/2018/09/10/introducing-the-react-profiler.html) when you open and close the menu, is the whole app being rendered? If so, how can we avoid that and still lift the state up?
@@ -92,7 +93,7 @@ The goal of this exercise is to understand what's state and how to reason about
92
93
- Basic React course from [freeCodeCamp](https://learn.freecodecamp.org/front-end-libraries/react/)
0 commit comments