Scotch.io Tutorial Questions Flashcards

1
Q

What is the React Context API?

A

A way to pass data through the component tree without having to pass props down manually at every level

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

What are the 3 fundamental concepts of React?

A

components, virtual DOM, and JSX

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

What are Props?

A

Props, short for properties, is the data that is getting passed to the component from a parent component.

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

What is State?

A

State is data that is being managed within the component. So if each component has it’s own state, how do we share that information to another component? You could use props, but props can only be passed between parent and child components.

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

What is Prop Drilling?

A

Nested components in react where we pas info from one component to the child component, then to that component’s child.

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

What is the key problem React’s Context API solves?

A

It allows us to have a state that can be seen globally to the entire application.

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

What are the two components of the React Context?

A

to define the data you will be sending around. that grabs the data an uses it.

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

When not to use Context?

A

For larger scale apps with multiple states, reducers, etc. consider using Redux (or other) instead of Context.

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