강의

멘토링

커뮤니티

Inflearn Community Q&A

podolsmith1829's profile image
podolsmith1829

asked

Vue.js Intermediate Course - Learn Vue.js, ES6, and Vuex by creating a web app

Introduction to mapState, mapGetters and Why Use ES6 Spread Operator

getters를 사용하는 이유에 대해 질문이 있습니다

Written on

·

200

1

state를 통해서 data를 직접 가져오는 것보다 getters를 사용하는 이유는 split 또는 * 연산 등등 통해 값을 가져오기 위함인가요?

답변 미리 감사합니다
 
 
 
 
vuejsjavascriptvuexes6

Answer 1

1

captain님의 프로필 이미지
captain
Instructor

안녕하세요 podol님, 네 getters로 선언하면 캐싱의 효과가 있긴 하지만 그냥 state로 접근하셔도 무방합니다 :)

podolsmith1829's profile image
podolsmith1829

asked

Ask a question