react-elements Flashcards

1
Q

What is React?

A

React is a JavaScript library developed by Facebook which, among other things, was used to build Instagram.com. Its aim is to allow developers to easily create fast user interfaces for websites and applications alike. The main concept of React. js is virtual DOM.

React can change how you think about the designs you look at and the apps you build. When you build a user interface with React, you will first break it apart into pieces called components. Then, you will describe the different visual states for each of your components. Finally, you will connect your components together so that the data flows through them. In this tutorial, we’ll guide you through the thought process of building a searchable product data table with React.

Used to build components in a simple and reusable way. Function returns html written in a syntax called JSX

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

What is a React element?

A

React Element - It is a simple 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.

React components are JavaScript functions that return markup:

it is a JavaScript object that describes a dom node

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

createRoot method of the reactDom object

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