First Look Into React Flashcards

1
Q

Why don’t we use vanilla JS when creating large sites:

A

This can lead to spaghetti code. Additionally, storing data in the DOM and sharing it across the application can result in numerous bugs.

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

Why do front-end frameworks exist?

A

Frameworks exist because they make it easier to keep a user interface in sync with data. Another reason they exist is that they enforce a correct way of structuring and writing code. Additionally, they provide developers and teams with a consistent way of building front-end applications.

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

What is React?

A

React is a JavaScript library for building user interfaces. In a longer definition, React is an extremely popular declarative, component-based, state-driven JavaScript library for building user interfaces, created by Facebook.

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

What are components?

A

Components are the building blocks for user interfaces in React. We build complex UIs by creating multiple components and combining them. We can also reuse components, making our codebase smaller and more DRY (Don’t Repeat Yourself).

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

What does declarative mean?

A

Declarative means telling React what a component should look like, based on current data.

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

What does the JSX syntax combine?

A

JSX is a syntax that combines HTML, CSS, and JS as well as referencing other components.

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

What does state-driven mean?

A

“State-driven” in React means that React responds to state changes and updates the page to reflect the current data.

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