Skip to content

Usage/Pattern confusion over retrieving from a Map #2505

Answered by scottwillman
scottwillman asked this question in Q&A
Discussion options

You must be logged in to vote

I think I can answer my own questions here in case it helps anyone (or I've got it wrong):

  1. If I retrieve the task early in the cmpt and store it in a const variable, at worst it will be retrieved on every refresh of the cmpt. It is still better than retrieving it wherever it's used.
  2. Yes, due to references, the observable in the store will be updated when a property on the new variable is changed.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by scottwillman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant