# 폼과 Controlled Components (React / Next.js) > Controlled components, uncontrolled components, 폼 유효성 검사, React Hook Form, submit 처리 - 20 면접 질문 - Mid-Level - [면접 질문: React / Next.js](https://sharpskill.dev/ko/technologies/react-next/interview-questions.md) ## 1. React에서 controlled component란 무엇인가요? **답변** Controlled component는 value prop과 onChange 핸들러를 통해 React state로 값이 관리되는 폼 요소입니다. 이는 React가 해당 데이터의 단일 진실 공급원이 된다는 것을 의미합니다. DOM이 자체 값을 유지하는 uncontrolled components와 달리, controlled components는 폼 데이터를 완전히 제어할 수 있고 실시간 유효성 검사를 용이하게 합니다. ## 2. React에서 controlled input을 어떻게 만드나요? **답변** Controlled input에는 두 가지 필수 요소가 필요합니다: React state에 바인딩된 value prop과 해당 state를 업데이트하는 onChange 핸들러입니다. onChange가 없으면 React가 모든 수정을 방지하므로 input은 읽기 전용이 됩니다. 이 접근 방식은 React state가 표시된 input 값과 동기화된 상태를 유지하도록 보장하여 즉각적인 유효성 검사나 데이터 변환을 가능하게 합니다. ## 3. Controlled component와 uncontrolled component의 차이점은 무엇인가요? **답변** 근본적인 차이는 데이터의 진실 공급원에 있습니다. Controlled component는 값을 React state(단일 진실 공급원)에 저장하는 반면, uncontrolled component는 DOM이 자체 값을 관리하도록 하며 ref를 통해 접근합니다. Controlled components는 더 많은 제어를 제공하고 실시간 유효성 검사를 용이하게 하지만, uncontrolled components는 복잡한 유효성 검사가 없는 기본 폼에서는 더 간단할 수 있습니다. ## 17개 추가 질문 이용 가능 - 같은 폼에서 여러 개의 controlled input을 어떻게 관리하나요? - React에서 controlled checkbox를 어떻게 만드나요? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 React / Next.js 면접 주제 - [JavaScript 기초](https://sharpskill.dev/ko/technologies/react-next/interview-questions/javascript-essentials.md): 25개 질문, Junior - [React 기초](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-fundamentals.md): 20개 질문, Junior - [React Hooks](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-hooks.md): 22개 질문, Junior - [컴포넌트 라이프사이클](https://sharpskill.dev/ko/technologies/react-next/interview-questions/component-lifecycle.md): 18개 질문, Junior - [React Router](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-router.md): 20개 질문, Junior - [Context를 활용한 상태 관리](https://sharpskill.dev/ko/technologies/react-next/interview-questions/state-management-context.md): 18개 질문, Junior - [데이터 가져오기 및 API](https://sharpskill.dev/ko/technologies/react-next/interview-questions/fetching-data-api.md): 20개 질문, Mid-Level - [React Query (TanStack Query)](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-query-tanstack.md): 20개 질문, Mid-Level - [Styling & CSS-in-JS](https://sharpskill.dev/ko/technologies/react-next/interview-questions/styling-css-in-js.md): 18개 질문, Mid-Level - [Next.js 기초](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-fundamentals.md): 25개 질문, Mid-Level - [TypeScript와 React](https://sharpskill.dev/ko/technologies/react-next/interview-questions/typescript-react.md): 20개 질문, Mid-Level - [Next.js 데이터 페칭](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-data-fetching.md): 24개 질문, Mid-Level - [Next.js Server Actions](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-server-actions.md): 20개 질문, Mid-Level - [Next.js 라우팅 및 내비게이션](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-routing-navigation.md): 22개 질문, Mid-Level - [Next.js API Routes](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-api-routes.md): 20개 질문, Mid-Level - [Next.js Metadata & SEO](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-metadata-seo.md): 18개 질문, Mid-Level - [Next.js Middleware 및 Auth](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-middleware-auth.md): 22개 질문, Mid-Level - [React 테스트](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-testing.md): 20개 질문, Mid-Level - [Zustand State Management](https://sharpskill.dev/ko/technologies/react-next/interview-questions/zustand-state-management.md): 18개 질문, Mid-Level - [React 성능 최적화](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-performance-optimization.md): 22개 질문, Senior - [Error Boundaries & 에러 핸들링](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-error-boundaries.md): 18개 질문, Senior - [Advanced React Patterns](https://sharpskill.dev/ko/technologies/react-next/interview-questions/advanced-react-patterns.md): 20개 질문, Senior - [Next.js 고급 기능](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-advanced-features.md): 24개 질문, Senior - [Next.js 배포 및 프로덕션](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-deployment-production.md): 20개 질문, Senior - [아키텍처 & 디자인 패턴](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-architecture-patterns.md): 22개 질문, Senior - [React Server Components](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-server-components.md): 26개 질문, Senior - [Next.js 국제화](https://sharpskill.dev/ko/technologies/react-next/interview-questions/nextjs-internationalization.md): 20개 질문, Senior - [React 보안 & 모범 사례](https://sharpskill.dev/ko/technologies/react-next/interview-questions/react-security-best-practices.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/react-next/interview-questions/forms-controlled-components