Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #4

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Readings/Passing-Functions-As-Props
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,24 @@ console.log(employee);
```
>See above

- In the video, what is the first step that the developer does to pass functions between components?

>create function where state needs to be changed, indentifys why he needs a function and where

- In your own words, what does the increment function do?

>the incriment function takes in an object, copys it, and modifies the value of property count on one of the objects if conditions are met. further more on the person component incriment just flips a property value to true/positive based on input.

- How can you pass a method from a parent component into a child component?

>as any other prop, through the object in the parent object

- How does the child component invoke a method that was passed to it from a parent component?

>
```js
this.props.method_name_from_parent(params needed for the method name)
```


<https://www.javascripttutorial.net/object/javascript-merge-objects/>