react-function-components Flashcards

1
Q

What is a React component?

A

Components are like JS functions. They accept inputs (called “props”) and return React elements describing what should appear on the screen.

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

Just like a function in JS… BUT, function name should be capitalized.

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

reactDOM.render() method

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