https://www.youtube.com/playlist?list=PLB7CpjPWqHOtYP7P_0Ls9XNed0NLvmkAh
선언형 프로그래밍 방식.
종속 대상에 따라 저장(캐싱)한다.
computed 속성을 가지면 Date.now()는 절대 업데이트되지 않는다.
명령형 프로그래밍 방식.
감시할 데이터를 지정하고 그 데이터가 바뀌면 이런 함수를 실행하게 한다.
watch: {
// 이때, message 는 data 의 이름과 같다.
message(newVal, oldVal) {
console.log(newVal, oldVal);
}
}
조건부 렌더링
'display: none' 스타일 속성 토글.
자주 바뀌는 컴포넌트에 사용.
배열의 엘리먼트와 객체의 속성을 나열할 수 있음.
Create a two-way binding on a form input element or a component.
Shorthand: #
Denote named slots or slots that expect to receive props.