react-elements Flashcards

1
Q

What is React?

A

A Javascript library for building 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

Object that describes a DOM node and its attributes or properties you can say. It is an immutable description object and you can not apply any methods on it. React Component - It is a function or class that accepts an input and returns a React element

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
  1. query select the element that exists in html
  2. use the createRoot() method of the ReactDOM object and the variable for the querySelector as an argument, assign to a variable
  3. render method of the variable of the root created in step 2, and take the element created by React.createElement
How well did you know this?
1
Not at all
2
3
4
5
Perfectly