Interview prep Flashcards

(9 cards)

1
Q

What and why React?

A

Effecient DOM updates for interactions
Component based mental models
Declarative structure JSX
Large ecosystem
Beyond SPA - SSR for SEO and Loading performance; Streaming
beyond the web to mobile and desktop

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

How is React efficient?

A

Fiber Architecture
Virtual DOM vs Real DOM, diffiing
Batch updates - batching

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

How can you stop automatic batching?

A

flushSync API to immediately push updated to DOM

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

What is HOC?

A

cross cutting cocerns
decorate component with props or statful logic
Its a pattern not a React thing

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

What is pure component?

A

same input same output

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

What is props?

A

immutable data that is passed into a component
- use for components to communicate within the component tree
- parent to child communication.
- child-to-parent communication via callbacks props
- descendants communication if no context

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

What is state?

A
  • a component’s local data that if fully controlled by the component
  • triggers re-render/reconciliation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do update a nested object state?

A

spread each nesting in the React’s setter
Immner for third party approach

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