8) Master Project: Redux 1 Flashcards

1
Q

Redux allows react state to be more ___

A

scalable

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

Redux is a library that makes state management …

A

easier

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

list the 3 principles of redux state management?

A
  1. Single source of truth
  2. State is read only
  3. Changes using pure functions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List the 4 steps in the Redux flow. what is the name for this kind of pattern?

A
  1. Action
  2. Root Reducer
  3. Store
  4. DOM changes

Flux Pattern

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

redux === ___

A

this.state

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

T/F: You can use redux with this.state?

A

T

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

What is middleware?

A

a piece of code that gets the action before it reaches the reducer

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

what does the redux logger middleware do?

A

logs out actions that get fired, and what the sate looks like before and after these actions.

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

what component from “react-redux” allows every component in the application to have access to the store redux? where does this component go?

A

provider; parent of everything

wraps around the entire application in index.js, so all components have access to the state.

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

T/F: every action triggers every reducer?

A

T

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

what is the connect function?

A

a higher order component that lets us modify our component to have access to redux

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

What is a selector in redux?

A

a slice of state data

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

what does the library “reselect” allow us to do?

A

create selectors in a way that they are cached and don’t trigger component re-rending if the state does not change

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

what are the two types of selectors?

A
  • *input selector:** a function that gets the whole state and returns a slice of it
  • *memoized selector:** when we use the createSelector function
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

list the 6 falsy of javascript

A
  1. 0
  2. false
  3. null
  4. undefined
  5. NaN
  6. ””
17
Q

when do you not put the exact argument in a <route> component?</route>

A

when their may be subsequent slashes indicating sub categories of that page

ex: shop/hats

18
Q

what is the overarching rule of righting Extensible Code?

A

keep the code structure as simple as possible

19
Q

what is the importance of using the alt attribute in an image tag?

A

the value of that property will be read by screen readers for the convenience of those with impaired vision.