React Fundamentals Flashcards

1
Q

Why React?

A
Just JavaScript
Unidirectional Dataflow
Composition
Explicit Mutations
Declarative
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

composition

A

composition of components

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

component examples

A

, …

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

component definition

A

functionality wrapped into isolated container, the component;

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

component ~ function; ie

A

components manage their own state; clear boundaries for managing complexity in applications

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

large app built from?

A

small apps; components

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

imperative vs declarative

A

imperative: tell the computer how to do something
declarative: tell the computer what to do

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

declarative vs functional

A

functional: doesn’t alter state
declarative: description of what, typically doesn’t alter state

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

react: mostly declarative

A

declarative handling of requests for a component; yet state is stored somewhere, and is set + altered.

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

Unidirectional Data Flow

A

Manage state in your application. UI is going to update to that state.

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

UI is a

A

a function of state.

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

Explicit mutations

A

explicitly change state with setState

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

React pieces we’re to learn

A
Babel
React Router
Axios
Webpack
React
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

React Router

A

maps specific url to specific component

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

Webpack

A

“code bundler”; uses Bable

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

Bable

A

“code transformer”

17
Q

Axios

A

HTTP Requests

18
Q

declarative, analogy

A

directions; declarative: give address. imperative: step by step.
delegation of imperative specificity (imperative abstraction)

19
Q

code bundler

A

takes code, transforms and bundles it; from one version to another (compliant)

20
Q

webpack needs to know:

A
  1. starting point of your application, or your root JavaScript file
  2. which transformations to make on your code.
  3. to which location it should save the new transformed code.
21
Q

npm commands

A

npm init
npm install --save
npm run test

22
Q

add test command, e.g. ava

A

“scripts”: {
“test”: “ava ‘app/**/*.test.js’ –verbose –require ./other/setup-ava-tests.js”
}