Some doubts about js object properties and object methods

const getters = {
    recentJobList : state => state.recentJob_list,
    //
};
< H2 > Q1: is recentJobList used as a name in name/value or a function name of {state = > state.recentJob_list}? < / H2 > < H2 > Q2: when I called at the front end, was {{recentJobList}} adjusting the function or equivalent to recentJobList ()-sharp-sharp-sharp problem description < / H2 >

translate, Google Arrow function

const getters = {
    recentJobList : function(state){
        return state.recentJob_list;
    }
};

  1. as
const getters = {
    recentJobList: function(state) { return state.recentJob_list)
}; 

is clear, except that the arrow function binds the current lexical scope

  1. {{recentJobList}} is not calling a function, it's just a reference
Menu