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

Commit 6cf6da5

Browse files
Parth ShahParth Shah
authored andcommitted
fix issues
1 parent f6b2bd9 commit 6cf6da5

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

config.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ steps:
205205
file: src/App.jsx
206206
position: 52
207207
pullRequest: '%actions.metaPR2.data.number%'
208-
- type: respond
209-
with: callback-example.md
210-
issue: Changes
211208
- type: createPullRequestComment
212209
body: change-props-students-activity.md
213210
file: src/App.jsx

responses/passing-functions-activity.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,21 @@ So where exactly are those functions we created to set state getting called?
44

55
On line 63 in `src/App.jsx`, it looks like we pass the `addAssignment` function as a prop in this chunk of code.
66

7-
Scroll down to see how we use the function in `src/List.jsx`
7+
Navigate to `src/List.jsx`
8+
9+
Let's take a look at this piece of code between lines 18 and 25 in `src/List.jsx`.
10+
11+
```jsx
12+
handleSubmit(event) {
13+
this.setState({
14+
value: ""
15+
});
16+
17+
this.props.addFunction(this.state.value);
18+
event.preventDefault();
19+
}
20+
```
21+
22+
It looks like when the submit button is clicked, we call the `addFunction` with the value of our input box. For assignments, this `addFunction` references the `this.addAssignment` in `App`. So when we call `this.props.addFunction`, we are calling back to the parent component and using the parent's function.
23+
24+
Scroll below for next steps!

responses/uncomment-grades-activity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LAST THING! Let's get our grades working! At the end of this activity, your code
55

66
### :keyboard: Activity: Uncomment the grades conditional in `src/App.jsx`
77

8-
1. Uncomment the conditional statment for our `grades` tab
8+
1. Uncomment the conditional statment between lines 83 and 92 for our `grades` tab
99
2. Save your code
1010
3. To run your code, move inside your repo folder in your terminal and run `npm start`
1111
4. Exit the process using `Ctrl + C`

0 commit comments

Comments
 (0)