B
B
BonBon Slick2020-02-07 10:01:19
redux
BonBon Slick, 2020-02-07 10:01:19

Should I use getters inside Redux / Vuex actions?

There are action, mutation, getters and state.
Access from the component to the state occurs through actions and getters. The first modify the state, the second receive data from the state.

In theory, if you use getters not only in components, but also in actoins, then there will be more logs and information for debugging, but this will be a mix of call logic and the use of getters from different application layers.

Use getters in actions or not? Why?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2020-02-07
@BonBonSlick

Use. I don't see any compelling reason not to. That's what the getter is for.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question