NgRx Store MCQs with answers Page - 4

Here, you will find a collection of MCQ questions on NgRx Store. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

F

Fox Root • 490 Points
Goal Maker

Q. After a Login Action is dispatched, who listens and performs the API call?

  • (A) Reducer
  • (B) Selector
  • (C) Effect
  • (D) StoreModule

F

Fox Root • 490 Points
Goal Maker

Q. After successful API response in login effect, what should happen next?

  • (A) Modify state directly
  • (B) Dispatch Success Action
  • (C) Reload page
  • (D) Call component method

F

Fox Root • 490 Points
Goal Maker

Q. Which part updates the authenticated user data in the store?

  • (A) Effect
  • (B) Reducer
  • (C) Component
  • (D) Service

F

Fox Root • 490 Points
Goal Maker

Q. How does the component receive updated user data after login?

  • (A) HTTP callback
  • (B) Selector subscription
  • (C) Direct reducer call
  • (D) Window event

F

Fox Root • 490 Points
Goal Maker

Q. If login API fails, what should the effect dispatch?

  • (A) Reducer error
  • (B) Failure Action
  • (C) Alert directly
  • (D) Reload application

F

Fox Root • 490 Points
Goal Maker

Q. Where should loading spinner state be stored?

  • (A) Component variable
  • (B) Global Store
  • (C) HTML template
  • (D) Router module

F

Fox Root • 490 Points
Goal Maker

Q. You need to fetch products when page loads automatically. What is the best approach?

  • (A) Call API inside constructor
  • (B) Dispatch LoadProducts action in ngOnInit
  • (C) Call reducer
  • (D) Use selector first

F

Fox Root • 490 Points
Goal Maker

Q. Why should reducers not contain API calls?

  • (A) Angular restriction
  • (B) Reducers must remain pure functions
  • (C) Performance issue only
  • (D) Selectors handle API

F

Fox Root • 490 Points
Goal Maker

Q. A component needs only user name from store. What is best practice?

  • (A) Get entire state
  • (B) Create selector for user name
  • (C) Use reducer directly
  • (D) Use service

F

Fox Root • 490 Points
Goal Maker

Q. Multiple components need cart data. What is correct architecture?

  • (A) Each component calls API
  • (B) Store cart data in NgRx store
  • (C) Use localStorage only
  • (D) Use global variable