React Function Components Flashcards

1
Q

What is a React component?

A

A React component is essentially a JavaScript function.

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

How do you define a function component in React?

A

Define a function and capitalize the name of the function.

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

How do you mount a component to the DOM?

A

Declare a React element with the component and then use the render method of the ReactDOM object.

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