React-function-component Flashcards
1
Q
What is a React component?
A
a piece of a UI or feature of the webpage. It allows you to split the UI into dependent, reusable pieces. –> Think about it as a function!!!!
2
Q
How do you define a function component in React?
A
function Capital first letter of the function definition. Write a javscript function that returns jsx element!!
3
Q
How do you mount a component to the DOM?
A
ReactDOM.render()