Skip to content

Commit e457775

Browse files
authored
Update README.md
Add useEffect to week 2
1 parent 2768ce1 commit e457775

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

week2/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
These are the topics for week 2:
66

7-
1. [API calls in React](https://study.hackyourfuture.net/#/react/api-calls.md)
7+
1. [Hooks](https://study.hackyourfuture.net/#/react/react-hooks.md)
8+
- **ONLY THE useEffect HOOK**
9+
2. [API calls in React](https://study.hackyourfuture.net/#/react/api-calls.md)
810
- When to load data
9-
2. [Client-side routing](https://study.hackyourfuture.net/#/react/routing.md)
11+
3. [Client-side routing](https://study.hackyourfuture.net/#/react/routing.md)
1012
- React-router
1113
- Protected routes
1214

@@ -20,7 +22,7 @@ These are the topics for week 2:
2022

2123
Last week we learned the basic building blocks of React and how to think in components. This week we are going to introduce some more advanced techniques to give you even more power!
2224

23-
Firstly, it is time to work with API's again. In vanilla JavaScript we learned about the fetch mechanism, but when thinking in a component way we need to approach it a little differently. Take a look at the study book [here](https://study.hackyourfuture.net/#/react/api-calls.md) to learn how you can interact with an API using React.
25+
Firstly, it is time to work with API's again. In vanilla JavaScript we learned about the fetch mechanism, but when thinking in a component way we need to approach it a little differently. To do this we need to make use of the `useEffect` hook, so let's revisit the [hooks](https://study.hackyourfuture.net/#/react/react-hooks.md) page and read up on the `useEffect` section. With knowledge of the `useEffect` hook we can take a look at the study book [here](https://study.hackyourfuture.net/#/react/api-calls.md) to learn how you can interact with an API using React.
2426

2527
Next, let's look at routing. Because we build single page applications in React, the location in the address bar has no effect on what we should show. When building more advanced applications that becomes a problem, as we want to be able to define different pages. To solve this we use what is called client-side routing, have a look [here](https://study.hackyourfuture.net/#/react/routing.md).
2628

0 commit comments

Comments
 (0)