# Nuxt 데이터 페칭 (Vue.js / Nuxt.js) > useFetch, useAsyncData, $fetch, lazy fetching, error handling, refresh, data caching - 20 면접 질문 - Mid-Level - [면접 질문: Vue.js / Nuxt.js](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions.md) ## 1. Nuxt에서 useFetch와 useAsyncData의 주요 차이점은 무엇인가요? **답변** useFetch는 useAsyncData와 $fetch를 감싸는 래퍼로, 일반적인 API 호출을 단순화합니다. URL 구성을 자동으로 처리하며 첫 번째 인자로 URL을 직접 받을 수 있는 반면, useAsyncData는 고유 키와 커스텀 fetcher 함수가 필요합니다. 간단한 API 호출에는 useFetch를, 복잡한 페칭 로직에는 useAsyncData를 사용합니다. ## 2. useAsyncData를 사용할 때 항상 고유한 키를 제공하는 것이 권장되는 이유는 무엇입니까? **답변** 고유한 키를 통해 Nuxt는 SSR 하이드레이션 중에 서버와 클라이언트 간의 요청을 식별하고 중복을 제거할 수 있습니다. 고유한 키가 없으면 서버 렌더링 후 클라이언트에서 데이터가 불필요하게 다시 fetch되거나 caching 충돌이 발생할 수 있습니다. 키는 caching과 state 관리에도 사용됩니다. ## 3. Nuxt에서 $fetch와 useFetch의 차이점은 무엇입니까? **답변** $fetch는 state 관리나 반응성 없이 단순한 HTTP 요청을 수행하는 유틸리티 함수로, 네이티브 fetch와 유사하지만 Nuxt의 향상된 기능을 갖추고 있습니다. useFetch는 반응형 ref(data, pending, error)를 반환하고 SSR 하이드레이션을 처리하는 composable입니다. event handler 내의 명령형 호출에는 $fetch를, 컴포넌트 내의 선언형 fetching에는 useFetch를 사용하십시오. ## 17개 추가 질문 이용 가능 - useFetch 또는 useAsyncData에서 lazy fetching을 활성화하려면 어떻게 해야 합니까? - useFetch로 데이터를 fetching하는 중에 발생하는 오류를 어떻게 처리합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Vue.js / Nuxt.js 면접 주제 - [JavaScript 기초](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/javascript-fundamentals.md): 20개 질문, Junior - [모던 JavaScript (ES6+)](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/es6-modern-javascript.md): 20개 질문, Junior - [Vue 기초](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-basics.md): 22개 질문, Junior - [Vue 컴포넌트](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-components.md): 20개 질문, Junior - [Vue Router](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-router.md): 18개 질문, Junior - [Pinia State Management](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/pinia-state-management.md): 20개 질문, Junior - [Vuex (Legacy)](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vuex-legacy.md): 15개 질문, Mid-Level - [Composition API](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/composition-api.md): 24개 질문, Mid-Level - [Vue 반응성](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-reactivity.md): 20개 질문, Mid-Level - [Nuxt 기초](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-fundamentals.md): 22개 질문, Mid-Level - [Nuxt SSR 및 SSG](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-ssr-ssg.md): 22개 질문, Mid-Level - [Nuxt 서버 라우트](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-server-routes.md): 20개 질문, Mid-Level - [Nuxt 모듈](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-modules.md): 18개 질문, Mid-Level - [Vue 컴포저블](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-composables.md): 20개 질문, Mid-Level - [Vue 폼과 유효성 검사](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-forms-validation.md): 20개 질문, Mid-Level - [Nuxt 상태 관리](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-state-management.md): 18개 질문, Mid-Level - [Vue 테스팅](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-testing.md): 20개 질문, Mid-Level - [Nuxt 배포 및 CI/CD](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-deployment-cicd.md): 22개 질문, Mid-Level - [Vue 성능](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-performance.md): 22개 질문, Senior - [Vue 고급 패턴](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-advanced-patterns.md): 24개 질문, Senior - [Vue와 함께 사용하는 TypeScript](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/typescript-vue.md): 22개 질문, Senior - [Nuxt 인증](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-auth.md): 20개 질문, Senior - [Nuxt에서의 SEO](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-seo.md): 20개 질문, Senior - [Nuxt 국제화](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-i18n.md): 18개 질문, Senior - [Vue 아키텍처](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-architecture.md): 22개 질문, Senior - [Nuxt 보안](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-security.md): 20개 질문, Senior - [Vue 생태계](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/vue-ecosystem.md): 18개 질문, Senior - [Vue 2→3 및 Nuxt 2→3 마이그레이션](https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/migration-vue2-vue3-nuxt2-nuxt3.md): 22개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/vue-nuxt/interview-questions/nuxt-data-fetching