Redux Interview Questions 1742275954
Redux Interview Questions 1742275954
Interview Questions
1- WHAT IS REDUX?
@.) Redux
Redux is a predictable state container for JavaScript apps
based on the Flux design pattern.
Redux can be used together with ReactJS, or with any other
view library.
2- WHAT IS FLUX?
Flux is an application design paradigm used as a replacement for
the more traditional mvc pattern.
It is not a framework or a library but a new kind of architecture
that complements React and the concept of Unidirectional Data
Flow.
Facebook used this pattern internally when working with React
The workflow between dispatcher, stores and views components
with distinct inputs and outputs.
3- WHAT IS REDUX DEVTOOLS ?
@.) Redux
Redux DevTools is a live-editing time travel environment for
redux with hot reloading, action replay, and customizable UI. If
you don't want to bother with installing Redux DevTools and
integrating it into your project, consider using Redux DevTools
Extension for Chrome and Firefox.
4- WHAT IS THE DIFFERENCE BETWEEN COMPONENT
AND CONTAINER IN REDUX ?
- Component is part of the React API. A Component is a class or
function that describes part of a React UI.
- Container is an informal term for a React component that is
connected to a redux store. Containers receive Redux state
updates and dispatch actions, and they usually don't render DOM
elements; they delegate rendering to presentational child
components.
s- WHAT ARE REDUCERS IN REoux? � Redux
The reducer is a pure function that takes the previous state
and an action, and returns the next state.
It's called a reducer because it's the type of function you would
pass to Array.prototype.reduce(reducer, ?initialValue). It's very
important that the reducer stays pure. Things you should
never do inside a reducer:
Mutate its arguments;
Perform side effects like API calls and routing transitions;
Call non-pure functions, e.g. Date.now() or Math.random().
6- WHAT IS REDUX-SAGA ?
@.) Redux
redux-saga is a library that aims to make side effects (i.e.
asynchronous things like data fetching and impure things like
accessing the browser cache) in React/Redux applications
easier and better. It is available in NPM as
You can use applyMiddleware where you can pass each piece of
middleware as a new argument. So you just need to pass each
piece of middleware you'd like. For example, you can add
Redux Thunk and logger middlewares as an argument as
below,