Fetch Flashcards

1
Q

What does fetch( ) return?

A
  • returns a promise
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A
  • use an init Object as the second argument to fetch( ), and set the method property of that object.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When does React call a component’s componentDidMount( ) method?

A
  • 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
4
Q

Name three React.Component lifecycle methods:

A
  • constructor( ), render( ), componentDidMount( ), componentDidUpdate( )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you pass data to a child component?

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