반응형
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 |
Tags
- devtools
- aws
- QUIC
- vue
- api test
- caching
- CloudFlare
- csr
- ViTE
- Testing
- http3
- ts error
- SSR
- custom command
- vue-cli
- https
- svelte
- web vital
- vue3
- msw
- rendering
- typeScript
- Cypress
- 비동기
- JavaScript
- CSS
- import.meta.env
- TLS
- 선택자
- e2e
Archives
- Today
- Total
목록watch (1)
Develop Note by J.S.
[Vue3] Watch
Watch는 Obverving 상태의 값이 변경 될 경우 동작시키는 logic을 사전에 정의하여 사용 할 수 있습니다. watch(question, async (newQuestion, oldQuestion) => { if (newQuestion.indexOf('?') > -1) { answer.value = '생각 중...' try { const res = await fetch('https://yesno.wtf/api') answer.value = (await res.json()).answer === 'yes' ? '네' : '아니오' } catch (error) { answer.value = '에러! API에 연결할 수 없습니다. ' + error } } }) 또한 단일 변수가 아닌 getter 등 여..
FrontEnd/Vue3
2023. 6. 19. 10:16