I am reviewing company code and see that in one of the Vue components, there are some computed properties that look like this:
computed: {
...mapState('settings', {
site: state => state.general.site
}),
...mapGetters('settings', [
'getRouteName'
])
}
Is there a benefit to using mapState over mapGetters? Why wouldn't we just create a mapGetter method for the site just like we did for the routeName?
My thought is maybe the arrow function helps with something but I didn't see anything in the documentation I looked at here: Vuex