Redux Js MCQ Questions And Answers
ReduxJs MCQ : This section focuses on "Basics" of Redux Js. These Multiple Choice Questions (MCQ) should be practiced to improve the Redux Js skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. Redux solves this problem by managing application’s state with a single global object called ?
A. directory
B. file
C. store
D. None of the above
View Answer
Ans : C
Explanation: Redux solves this problem by managing application’s state with a single global object called Store.
2. Predictability of Redux is determined by __________ most important principles.
A. Two
B. Three
C. Four
D. Five
View Answer
Ans : B
Explanation: Predictability of Redux is determined by three most important principles : Single Source of Truth, State is Read-only and Changes are made with pure functions.
3. What is true about redux?
A. Redux is a predictable state container for JavaScript apps.
B. Redux fundamental principles help in maintaining consistency throughout your application
C. Redux makes debugging and testing easier
D. All of the above
View Answer
Ans : D
Explanation: All of the above statement are true.
4. ___________ is a plain object that describes the intention to cause change with a type property.
A. class
B. plain
C. action
D. object
View Answer
Ans : C
Explanation: An action is a plain object that describes the intention to cause change with a type property.
5. Actions and states are held together by a function called?
A. Reducer
B. Redux
C. suscribe
D. view
View Answer
Ans : A
Explanation: Actions and states are held together by a function called Reducer. An action is dispatched with an intention to cause change. This change is performed by the reducer.
6. Redux follows the ____________ data flow.
A. unidirectional
B. bidirectional
C. Both A and B
D. None of the above
View Answer
Ans : A
Explanation: Redux follows the unidirectional data flow.
7. The ____________ can retrieve updated state and re-render again.
A. state
B. store
C. view
D. action
View Answer
Ans : C
Explanation: The view can retrieve updated state and re-render again.
8. The _______ notifies the view by executing their callback functions
A. state
B. store
C. reducer
D. action
View Answer
Ans : B
Explanation: The store notifies the view by executing their callback functions
9. A store is an ___________ object tree in Redux.
A. immutable
B. mutable
C. Both A and B
D. None of the above
View Answer
Ans : A
Explanation: A store is an immutable object tree in Redux.
10. Redux can have _________ store in your application
A. single
B. double
C. multi
D. None of the above
View Answer
Ans : A
Explanation: Redux can have only a single store in your application. Whenever a store is created in Redux, you need to specify the reducer.
11. A createStore function can have _________ arguments.
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C
Explanation: A createStore function can have three arguments. The following is the syntax : createStore(reducer, [preloadedState], [enhancer])
12. Which method helps you retrieve the current state of your Redux store?
A. dispatch
B. subscribe
C. action
D. getState
View Answer
Ans : D
Explanation: getState : It helps you retrieve the current state of your Redux store.The syntax for getState is as follows : store.getState()
13. Which of the following is react-Redux helper method?
A. help()
B. assist()
C. view()
D. connect()
View Answer
Ans : D
Explanation: You can dispatch an action by directly using store.dispatch(). However, it is more likely that you access it with react-Redux helper method called connect(). You can also use bindActionCreators() method to bind many action creators with dispatch function.
14. Which of the following rules are correct for Pure Functions?
A. A function returns the same result for same arguments.
B. Its evaluation has no side effects, i.e., it does not alter input data.
C. No mutation of local & global variables
D. All of the above
View Answer
Ans : D
Explanation: All of the above are rules for Pure function.
15. Reducers are a pure function in Redux.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, Reducers are a pure function in Redux.
16. Pure functions are unpredictable
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: False, Pure functions are predictable.
17. Which of them provide us debugging platform for Redux apps?
A. Redux-Testing
B. Redux-Middleware
C. Redux-Devtools
D. Redux-suscriber
View Answer
Ans : C
Explanation: Redux-Devtools provide us debugging platform for Redux apps. It allows us to perform time-travel debugging and live editing.
18. Both props and state are plain JavaScript objects.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, Both props and state are plain JavaScript objects.
19. Which of the following makes stores available?
A. COMPONENT
B. CONTAINER
C. ACTIONS
D. PROVIDER
View Answer
Ans : D
Explanation: PROVIDER : Makes stores available
20. Which method allows you to dispatch an action to change a state in your application?
A. getState
B. setState
C. dispatch
D. subscribe
View Answer
Ans : C
Explanation: dispatch : It allows you to dispatch an action to change a state in your application.The syntax for dispatch is as follows : store.dispatch({type:'ITEMS_REQUEST'})
Discussion