-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d3fce2
commit fbaa2b1
Showing
10 changed files
with
65 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
exercises/01.managing-ui-state/01.problem.use-state/README.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# useState | ||
|
||
👨💼 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 | ||
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 | ||
the list of blog posts. And when the checkboxes are checked, we want to update | ||
the filter for the user to include those values. You might find it helpful to | ||
review the code before you get started. | ||
|
||
👨💼 Thanks Kellie! Ok, so we're going to take this step-by-step. For this first | ||
step, we just want you to create a state variable for the user's query and pass | ||
that along to the `<MatchingPosts />`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
exercises/01.managing-ui-state/01.solution.use-state/README.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
# useState | ||
|
||
👨💼 Super! You've successfully filtered the blog posts based on what the user has | ||
typed. This is where we start getting into why React is so great. It makes doing | ||
stateful dynamic things like this super easy compared to the alternative of | ||
working with the DOM directly. Let's keep going. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
exercises/01.managing-ui-state/02.problem.control/README.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,15 @@ | ||
# Controlling Inputs | ||
|
||
👨💼 When the user clicks on one of the checkboxes, we want to auto-fill that | ||
value into the search input for them. This means we need to "control" the input | ||
value so we can set it programmatically. We can do this by using the `value` | ||
prop on the input. | ||
|
||
📜 You can read up more on this in the React docs: | ||
[Controlling an input with a state variable](https://react.dev/reference/react-dom/components/input#controlling-an-input-with-a-state-variable) | ||
|
||
Once we add the query as the value for the input, we'll also want to have a | ||
function responsible for updating the query when the user checks or unchecks the | ||
checkboxes and call that in the `onClick` handler of the checkboxes. | ||
|
||
Good luck! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
# React Hooks 🎣 | ||
|
||
👨💼 Hello! I'm Peter the Product manager and I'm here to help guide you through | ||
this workshop. I'll be there to tell you what our users want and to help you | ||
understand the requirements of the tasks you'll be working on. | ||
|
||
React hooks are an critical part of React development. You can think of them as | ||
atoms to the React component molecule. Everything outside of basic rendering | ||
can be done with hooks. | ||
|
||
In this workshop, we'll learn how to use hooks to manage state, synchronize | ||
side-effects, generate unique ids, and more. There's a lot to hooks and we'll | ||
get into more advanced use cases in a future workshop. In this one you'll get | ||
a solid understanding of the basic hooks and how to use them. | ||
|
||
So let's get started! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tsconfig.json |