Redux State Management MCQs
1. Which of the following is not an implementation of Flux?
Answer:- Fluxit
2. Modularity in Redux is achieved through ________________
Answer:- Reducers
3. In Redux, state variables and objects are never mutated. Instead, new ones are produced.
Answer:- True
4. The function random() produces a new random number between 0 and 1 every time you run it. Is this a pure function?
Answer:- False
5. Data flow in Redux is:
Answer:- Uni-Directional
6. Which of the following is not true about Pure Functions
Answer:- Can make API calls
7. In Redux Action Types have to be defined as Strings
Answer:- True
8. Which of the following Action Objects are syntactically correct?
Answer:- { type: 'ADD_TODO', text }
9. Actions in Redux
Answer:- Send data to Store
10. Which of the following functions can be used to dispatch actions in Redux?
Answer:- All the options mentioned
Action Creators in Redux
Answer:- All the options mentioned
12. What is the input for the dispatch function?
Answer:- Action Object
13. Following function is a __________?
Answer:- (previousState, action) => newState
Reducer
14. createStore is a function to be imported from ____________
Answer:- Redux
15. Which of the following statements about Reducers is not true?
Answer:- Can make API calls
16. combineReducers aggregates the output of reducers into a single object representing application state.
Answer:- True
17. Which of the following can be done in a Reducer?
Answer:- Perform Calculations
18. Presentational components of React are connected to the container components of React.
Answer:- True
19. State Changes in Redux are stored in such a way that _____________
Answer:- State changes are stored as new state with references to old state for unchanged sections of the state tree.
20. Which of the following can be done inside a reducer?
Answer:- Call a pure function
21. What is the helper function that Redux provides for making root reducer?
Answer:- CombineReducer()
22. Redux bindings to React are to be imported from ____________.
Answer:- ReactRedux
23. How to access Redux state from store?
Answer:- getState()
24. One can deregister listeners on store by calling function returned by _______________.
Answer:- subscribe(listner)
27. Which of the following is not api of redux library
Answer:- connect()
28. React bindings for Redux are enabled by default.
Answer:- False
29. Which of the following is a signature of a reducer function?
Answer:- function name(state, action)
30. How can initial state be passed to store the, using the createStore function?
Answer:- Pass it as second aurgument
31. The function double is defined as below. Is this a pure function?
Answer:- const double = x => x * 2;
True
32. How is the context of store passed to React components?
Answer:- Using Provider
33. Redux applications follow _____________________
Answer:- Functional Programming
34. What are middleware used for?
Answer:- To create new dispatch function
35. How to register for listeners on store?
Answer:- subscribe(listener)
36. Redux can be used with React, AngularJS, BackboneJS and many others.
Answer:- True
37. Which components take care of connecting to Redux store for data fetching and state updates?
Answer:- Container
38. How do you bind action creators with dispatch function?
Answer:- bindActionCreators