반응형
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
- msw
- TLS
- import.meta.env
- https
- ts error
- csr
- JavaScript
- ViTE
- http3
- SSR
- vue3
- caching
- rendering
- CloudFlare
- svelte
- e2e
- typeScript
- devtools
- Cypress
- vue-cli
- Testing
- custom command
- QUIC
- aws
- 선택자
- CSS
- vue
- api test
- 비동기
- web vital
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