Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • 2
    I don't know how to implement mapGetters. Can you point me to an example. It would be a big help. I just implement GONG answer at the moment. TY Commented May 15, 2017 at 6:27
  • 2
    @Rbex "mapGetters" is part of 'vuex' library. You don't need to implement it. Commented May 16, 2017 at 15:07
  • 140
    This answer is just wrong. He actually needs to watch the computed properties. Commented May 23, 2018 at 1:09
  • 19
    The getter once called will only retrieve the state at that time. If you want that property to reflect the state change from another component you have to watch it. Commented Jun 2, 2018 at 12:23
  • 5
    Why "You should not use component's watchers to listen to state change"? Here is example you might not think of, if I want to watch on token from the state, and when it change to redirect to another page. so, there is some cases you need to do that. maybe you need more experience to know that. Commented Sep 29, 2018 at 16:28