Fetch Flashcards

1
Q

What doesfetch()return?

A

Returns a promise that resolves with a Response object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the default request method used byfetch()?

A

GET

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you specify the request method (GET,POST, etc.) when callingfetch?

A

Pass in options object to the fetch() method as a second argument.
Options = { method: REQMETHOD }

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When does React call a component’scomponentDidMountmethod?

A

Is invoked immediately after a component is mounted (inserted into the tree). After the first successful render.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Name three React.Component lifecycle methods.

A

constructor
render
componentDidMount
componentDidUpdate
componentWillUnmount

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do you pass data to a child component?

A

As props

How well did you know this?
1
Not at all
2
3
4
5
Perfectly