Answer the question
In order to leave comments, you need to log in
Does it make sense to create getters just before the fields of the object in the state?
Good evening.
There is a user object in storage:
user: {
_id: 0,
firstName: "Иван",
lastName: "Галкин",
middleName: "Александрович",
name: "Галкин Иван",
isActive: true
}
getters: {
_id: state => state.user._id
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question