react Flashcards
1
Q
What is React?
A
React is a free and open-source front-end JavaScript library for building user interfaces based on User Interface components.
2
Q
What is a React element?
A
it is an object representation of a virtual DOM node
its an object that describes an html element that will ultimately be displayed on the screen
3
Q
How do you mount a React element to the DOM?
A
with the render method
4
Q
What is a React component?
A
Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and return HTML.
5
Q
How do you define a function component in React?
A
same way as defining a function
6
Q
How do you mount a component to the DOM?
A