React and Redux Flashcards
Explain what a state is ?
Example could be if user authenticated?
Is a modal open?
List of blog posts rendered.
State influences what you see on the screen?
Explain how redux works to resolve complexity in managing states?
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 do you make a component a router container
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.
Which of the router objects is used for static requests in react?
The HashRouter is used to handle static requests.
What is the purpose of BrowserRouter
It is a router object used to handle dynamic requests
What is the purpose of an action?
Actions are objects , in redux , creators are used to make actions.
What is a thunk in redux?
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.
What library is used for running thunks in react redux programs?
reduxthunk library is used for dispatching actions objects to main redux store.
What is axios
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.
What is redux thunk
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.