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
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category NgRx Store
  • Hashtags:

Explanation by: Fox Root
Selectors improve performance and prevent unnecessary re-renders.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.