React Flashcards

1
Q

Props and cons using hooks

A

React hooks give us the capability to use functional components over class components. FC are easier to read, write with less code. FC are functions that take arguments and return value. Hooks are much more powerful, we can create custom hooks

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

Props and cons of using typescript

A

Personally since I discovered typescript I can’t stopped using it. It has some downsides like set proper interfaces might be challenging sometimes. But has a lot of positives. Is much easier to read and debug.

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

What react works?

A

React creates a virtual DOM. when state changes in a component, first it runs diffing Algoritm , which identifies what has changed in the virtual DOM, and then updates changes.

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

What is JSX

A

JSX isa syntax expression for Javascript. After compilation JSX becomes regular Javascript objects

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

What is difference between class components and functional components

A

Class components allows us to locate state and hooks. Functional components jute read props don’t have their own state

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

What is HOC?

A

Higher Order Components is a function that takes a component and returns a new component

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

What is Redux

A

The entire state of the app is kept in a single store. A stroke is a Javascript object. The only way to change the state is by firing action and write reducer for that action that changes the state. Reducer cannot have any side effects

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