React and Redux Flashcards

1
Q

Explain what a state is ?

A

Example could be if user authenticated?
Is a modal open?
List of blog posts rendered.
State influences what you see on the screen?

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

Explain how redux works to resolve complexity in managing states?

A

Java ascript offers global . Whereas using global variable will not work react offers flow of data through a central store in each application. It works as a library which stores entire application state .it offers a clearly defined process of how state may change.

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

How do you make a component a router container

A

You do this in index or app.js by using a browserRouter object to wrap the component which will be able to render or read routes. Making it the router of the component.

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

Which of the router objects is used for static requests in react?

A

The HashRouter is used to handle static requests.

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

What is the purpose of BrowserRouter

A

It is a router object used to handle dynamic requests

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

What is the purpose of an action?

A

Actions are objects , in redux , creators are used to make actions.

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

What is a thunk in redux?

A

A thunk is a middleware which uses a function that contains asynchronous action containers and are designed to delay their operation until its needed. It works as a dispatcher in form of a anonymous function and similar to promise.

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

What library is used for running thunks in react redux programs?

A

reduxthunk library is used for dispatching actions objects to main redux store.

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

What is axios

A

It is a promised based HTTP Client that works both in node and browser environment. It provides a single API for dealing with XMLHttpRequests and Node HTTP interface.

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

What is redux thunk

A

It is designed to change the default setting of making the action creator immediately return an action. Instead
working as a dispatch which takes waits for a function wrapper with an action and sends all action to different reducers in the store.

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