Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit 1833263

Browse files
committed
edit responses for step 5
1 parent e4e79f5 commit 1833263

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

responses/03_uncomment-assignments-activity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Now that we imported the child component, let's use it in our code. At the end o
1616
2. Save your changes
1717
3. To run your code, move inside your repo folder in your terminal and run `npm start`
1818
4. Exit the process in your terminal using `Ctrl + C`
19-
5. Stage, commit, and push your code to the `changes` branch:
19+
5. Stage, commit, and push your changes to the `changes` branch:
2020
```
2121
git add src/App.jsx
2222
git commit -m "uncomment assignment rendering"
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
## Step 5: Adding a prop
1+
## Step 5: Adding a `prop`
22

3-
But what does the `List` component do with this information? Let's take a look.
3+
What does the `List` component do with the information we just included? Adding `this.props` tells the component to look for the property that was passed to it.
44

5-
Go to `src/List.jsx`. In the `render` method, in our input tag, you see that we set our `placeholder` to `this.props.placeholder`, and then at the bottom of our `render` method, we loop through out `this.props.currList`, to show each item in the list that we pass. Adding `this.props` tells the component to look for that property that was passed to it.
5+
To see, open the `src/List.jsx` file. In the `render` method, in our input tag, notice that we set our `placeholder` to `this.props.placeholder`. Then, at the bottom of our `render` method, we loop through out `this.props.currList`. This shows each item in the list that we pass.
66

7-
Let's go ahead and replace that title with a prop.
7+
Let's go ahead and replace the current title with another `prop`.
88

99
### :keyboard: Activity: Replace the title prop in `src/List.jsx`
1010

11-
1. In our `render` method in `src/List.jsx`, on line 31, replace `REPLACE THIS TITLE WITH A PROP` with `{this.props.title}`
12-
2. Save your code
11+
1. In `src/List.jsx`, replace line 31 with `{this.props.title}`
12+
2. Save your changes
1313
3. To run your code, move inside your repo folder in your terminal and run `npm start`
1414
4. Exit the process in your terminal using `Ctrl + C`
15-
5. Commit and push your code to the `changes` branch:
15+
5. Stage, commit, and push your changes to the `changes` branch:
1616
```
1717
git add src/List.jsx
18-
git commit -m "use a prop"
18+
git commit -m "use a prop for the header"
1919
git push
2020
```
2121
2222
<hr>
23-
<h3 align="center">Watch below this comment for my response</h3>
23+
<h3 align="center">Watch below this comment for my response.</h3>

0 commit comments

Comments
 (0)