반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Testing
- vue3
- CSS
- 선택자
- QUIC
- custom command
- CloudFlare
- msw
- 비동기
- JavaScript
- devtools
- vue
- caching
- vue-cli
- ViTE
- csr
- TLS
- e2e
- SSR
- https
- rendering
- web vital
- import.meta.env
- Cypress
- http3
- svelte
- ts error
- api test
- aws
- typeScript
Archives
- Today
- Total
목록Ref (1)
Develop Note by J.S.
[Vue3] Ref, Reactive, Props, Emit type 지정 방법
Vue3 에서 타입지정 할 때 Vue3의 타입스크립트가 익숙치 않은 경우 타입지정이 까다롭습니다. 주로 사용하는 기능에 대한 타입 지정 방법입니다. 1. ref import { ref } from 'vue' import type { Ref } from 'vue' // 변수에 직접 type을 지정하는 case const year: Ref = ref('2020') year.value = 2020 // ok! // or //ref 함수 호출 시 제네릭으로 타입을 지정하는 case const year = ref('2020') year.value = 2020 // ok! 2. reactive import { reactive } from 'vue' interface Book { title: string year?:..
FrontEnd/Vue3
2023. 6. 16. 12:28