Skip to content

Commit ef36c80

Browse files
Nitpicks for Section 1 (#241)
1 parent 1675fb2 commit ef36c80

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

β€Žexercises/01.managing-ui-state/01.problem.use-state/README.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
πŸ‘¨β€πŸ’Ό We've got you working on a blog search page. Allow me to introduce you to
66
πŸ§β€β™‚οΈ Kellie the coworker who put this together.
77

8-
πŸ§β€β™‚οΈ Hello! I'm Kellie the co-worker and I do things for you sometimes. I've
8+
πŸ§β€β™‚οΈ Hello! I'm Kellie the coworker and I do things for you sometimes. I've
99
started up this app that you're going to be working with. There's a search
1010
input, a couple checkboxes, a submit button, and a list of blog posts. You've
1111
been asked to make it so when the user types into the search field it filters

β€Žexercises/01.managing-ui-state/05.problem.cb/README.mdx

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ need it.
3737
So
3838

3939
```tsx
40-
// both of these work just fine:
40+
// This will call getQueryParam on every render, undermining our optimization! 😡
4141
const [query, setQuery] = useState(getQueryParam())
42+
43+
// This will _only_ call getQueryParam on init. Great! βœ…
4244
const [query, setQuery] = useState(getQueryParam)
4345
```
4446

0 commit comments

Comments
Β (0)