From ef36c8028fd85ab9c46e2c5f08a530df7dba7357 Mon Sep 17 00:00:00 2001 From: "Ian J. MacIntosh" Date: Sat, 19 Oct 2024 02:27:57 -0300 Subject: [PATCH] Nitpicks for Section 1 (#241) --- .../01.managing-ui-state/01.problem.use-state/README.mdx | 2 +- exercises/01.managing-ui-state/05.problem.cb/README.mdx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/exercises/01.managing-ui-state/01.problem.use-state/README.mdx b/exercises/01.managing-ui-state/01.problem.use-state/README.mdx index 934db92a3..6a707094e 100644 --- a/exercises/01.managing-ui-state/01.problem.use-state/README.mdx +++ b/exercises/01.managing-ui-state/01.problem.use-state/README.mdx @@ -5,7 +5,7 @@ 👨‍💼 We've got you working on a blog search page. Allow me to introduce you to 🧝‍♂️ Kellie the coworker who put this together. -🧝‍♂️ Hello! I'm Kellie the co-worker and I do things for you sometimes. I've +🧝‍♂️ Hello! I'm Kellie the coworker and I do things for you sometimes. I've started up this app that you're going to be working with. There's a search input, a couple checkboxes, a submit button, and a list of blog posts. You've been asked to make it so when the user types into the search field it filters diff --git a/exercises/01.managing-ui-state/05.problem.cb/README.mdx b/exercises/01.managing-ui-state/05.problem.cb/README.mdx index 519cc75f5..e68baf176 100644 --- a/exercises/01.managing-ui-state/05.problem.cb/README.mdx +++ b/exercises/01.managing-ui-state/05.problem.cb/README.mdx @@ -37,8 +37,10 @@ need it. So ```tsx -// both of these work just fine: +// This will call getQueryParam on every render, undermining our optimization! 😵 const [query, setQuery] = useState(getQueryParam()) + +// This will _only_ call getQueryParam on init. Great! ✅ const [query, setQuery] = useState(getQueryParam) ```