Skip to content

Commit a76f195

Browse files
committed
not sure yet with RRHN only Pref Dialog?
1 parent 625255f commit a76f195

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

assignment_cwd_5.4.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Hooks in the React Hacker News Client
2+
3+
Now that we have a feel what React Hooks can do. We can implement in the React
4+
Hacker News Client.
5+
6+
7+
Let's start with something relatively simple: the Preferences Dialogue. We will
8+
go through the same steps as we did with the pokesearch:
9+
10+
* Class based component --> functional component
11+
* Replace the state with the `useState` hook
12+
* Replace all side effects (methods that use fetch with `useEffect`)
13+
14+
15+
The Preferences Dialogue, should be a
16+
17+
👉 functional component
18+
19+
👉 should only use state with `useState`
20+
21+
{{exCommit "Stuur je commit in" "RrHN-assignment5.4"
22+
23+
exCommit}}

0 commit comments

Comments
 (0)