
Helper함수와 store 모듈화
# Helper함수(헬퍼) 1. state -> mapState 2. getters -> mapGetters 3. mutations -> mapMutations 4. actions -> mapActions > vuex에 있는 헬퍼를 로딩 1) 따로 js파일(게터나 뮤테이션만 모아둔 js파일)로 만든 후 export한다. - 나의 경우 "./getters" 으로 만들었으나 하나의 js 파일로 만들어도 된다. const getTotalNum = (state) => { return state.todoItems.length; }; const getTrueNum = (state) => { //인자는 state const trueItem = state.todoItems.filter((item) => item.com..