ReactJS Flashcards

1
Q

What is React?

A

React is an open-source JavaScript library created by Facebook for building complex, interactive UIs in web and mobile applications

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

How is React different from other JS frameworks?

A

React is a small library focused on building UI components
React focuses exclusively on the creation of components
allows a developer an incredible amount of flexibility in choosing the architecture they deem “best”

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

What happens during the lifecycle of a React High-Level component?

A

React components have lifecycle events that fall into three general categories:

Initialization
State/Property Updates
Destruction

Every React component defines these events as a mechanism for managing its properties, state, and rendered output

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

What happens during the lifecycle of a React Low-Level component?

A

Within these three general buckets exist a number of specific lifecycle hooks — essentially abstract methods — that can be utilized by any React component to more accurately manage updates

events under “Initialization” only happen when a component is first initialized or added to the DOM

events under “Destruction” only happen once when the component is removed from the DOM

events under “Update” happen every time the properties or state of the component change
components will automatically re-render themselves any time their properties or state change

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

What is JSX?

A

embeds raw HTML templates inside JavaScript code

JSX code by itself cannot be read by the browser - it must be transpiled into traditional JavaScript using tools like Babel and webpack

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

What is Flux?

A

an architectural pattern that enforces unidirectional data flow

its core purpose is to control derived data so that multiple components can interact with that data without risking pollution

The Flux pattern is generic

Action ➡️ Dispatcher ➡️ Store ➡️ View

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

What are state-less components?

A

a flavor of “reusable” components

pure functions that render DOM based solely on the properties provided to them

The component has no need for any internal state — let alone a constructor or lifecycle handlers

The output of the component is purely a function of the properties provided to it

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