react-function-components Flashcards
1
Q
What is a React component?
A
Conceptually, components are like JavaScript functions.
Components let you split the UI into independent, reusable pieces.
Think about each piece in isolation.
2
Q
How do you define a function component in React?
A
Function name (props) {
Return (rendered React elements)
}
3
Q
How do you mount a component to the DOM?
A
By using ReactDOM.render