react-elements Flashcards

1
Q

What is React?

A

React is a JavaScript library for creating user interfaces.

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

What is a React element?

A

It is the basic building block in a react application, it is an object representation of a virtual DOM node. React Element contains both type and property. It may contain other Elements in its props. React Element does not have any methods, making it light and faster to render than components.
-https://www.geeksforgeeks.org/what-is-the-difference-between-element-and-component/

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

How do you mount a React element to the DOM?

A

React will assign the current property with the DOM element when the component mounts, and assign it back to null when it unmounts.
-https://reactjs.org/docs/refs-and-the-dom.html

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