React Forms Quiz
Test your knowledge of React forms, controlled inputs, uncontrolled inputs, validation, and submit handling.
20 questions · free · answers explained
All questions in this quiz
- What is a controlled input in React?
- Which props are commonly used for a controlled text input?
- What happens if you pass value to an input without updating it in onChange?
- What is an uncontrolled input in React?
- Which prop sets the initial value of an uncontrolled text input?
- Which prop controls whether a checkbox is checked?
- Why should controlled input state usually start as an empty string instead of undefined?
- What is the purpose of event.preventDefault in a React form submit handler?
- Which event handler is commonly used to handle a React form submission?
- What does the name attribute provide in a standard form field?
- How should a controlled select element usually store the selected option?
- What is a common way to handle several controlled fields with one change handler?
- Why might a file input be treated as uncontrolled?
- Where is simple client-side form validation often performed in React?
- What does disabled on a submit button commonly communicate?
- Why can controlled forms become slow in very large components?
- Which approach can help reduce unnecessary form re-rendering?
- When is an uncontrolled input a reasonable choice?
- Which API can read values from form fields during submission?
- What should a button that is not meant to submit a form usually specify?
Prefer to read first? React interview questions with written answers.